PingHuskar/npm-bahtrext
..........
https://www.npmjs.com/package/bahtrext
pinghuskar.github.io/npm-bahtrext/
- JavaScript100.0%
1 Review
BahtRext is a focused and useful npm package for converting numeric values into Thai baht text, and it shows real domain care rather than being a thin wrapper. The README’s discussion of the “101” reading ambiguity is especially valuable because it explains a culturally specific edge case and compares behavior with Google Sheets, Excel, and other Thai baht text libraries. The implementation also covers more than the basic happy path: Thai numerals, negatives, separators, very large values, binary/octal/hex inputs, satang rounding, reverse text-to-number behavior, and a chainable BR class. The test suite is a strong signal for a small package: index.test.js is large and covers many tricky numeric cases, including leading zeros, decimal rounding, Thai digits, special “เอ็ด” behavior, and extremely large numbers.
The main improvement area is polish around package reliability and contributor confidence. The GitHub repo currently has 1 star, 0 forks, 0 open issues, and no visible .github CI setup, contribution guide, or standalone LICENSE file, even though package.json declares MIT. Adding GitHub Actions to run Jest on push/PR would make the project easier to trust. The README install command is also stale compared with npm: the registry currently reports 2.5.2, while the repo README still shows 2.5.0 and the cloned branch package.json showed 2.5.1, so release automation or a prepublish checklist would help. I would also fix the TypeScript declarations: BR#set, toggleed, sum, minus, and pow return this in implementation, but index.d.ts declares several as void or string. That mismatch can frustrate TypeScript users. Overall, this is a genuinely practical library with unusually thoughtful edge-case coverage; tightening release metadata, CI, docs freshness, and typings would make it feel much more production-ready.
