npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bahtrext

v2.5.2

Published

BahtText Stringify

Readme

BahtRext

Download/month Total Download

Quality Gate Status Bugs Code Smells Duplicated Lines (%) Lines of Code

Reliability Rating Security Rating Maintainability Rating Vulnerabilities

Alt

OpenTelemetry

This project is instrumented with OpenTelemetry. To enable tracing, you will need to configure the OTLP exporter by setting the following environment variables:

  • OTEL_EXPORTER_OTLP_ENDPOINT
  • OTEL_EXPORTER_OTLP_HEADERS

For more information, please refer to the OpenTelemetry documentation.

Install

ES6

npm install [email protected]

ES5

npm install [email protected]

Demo / Example

Must Read

  • Checkout Test Cases in index.test.js
  • 101 ควรจะถูกอ่านอย่างไร ?
    • หนึ่งร้อยหนึ่งบาทถ้วน
      • Google Sheets
      • สัญญากู้เงินของธนาคาร* ลองมากู้ได้เลยครับ ถ้าไม่ใช่บอกผมด้วย
      • jojoee/bahttext
      • จะอ่านว่าเอ็ดเมื่อหลักสิบมีค่า เช่น สิบเอ็ด, ยี่สิบเอ็ด
    • หนึ่งร้อยเอ็ดบาทถ้วน
    • หนึ่งร้อยหนึ่งบาทถ้วน หรือ หนึ่งร้อยเอ็ดบาทถ้วน ก็ได้ ให้เข้าใจได้ตรงกัน

Beliefs

  1. Money in Thai Baht can be translate to word
  2. Default Decimal places is 2 digits; 3+ digits are optional.
  3. Support Negative Number as Other Baht JS Library
  4. All Synchronous function
  5. This Number System not working well with large numbers. Is there a better way to read numbers in Thai?

Test Regex

😊 Plz Consider

Author

Chadin Chaipornpisuth

Changes

  • 2.4.0 - Clean Code?
  • 2.3.4 - Infinity
  • 2.2.0 - ES6 [1.7.2]
  • 1.7.1 - apply Rest Parameters => add function BulkReplace, applyReplacements
  • 1.7.0 - add class BR
  • 1.6.2 - [Refact.ai] model gpt-4o-mini + human refactor
  • 1.6.1 - allow literal separator (,)
  • 1.6.0 - add Hexadecimal
  • 1.5.0 - add Binary Literal
  • 1.4.3 - 1.4.4 - Refactor
  • 1.4.2 - add NEG
  • 1.3.3 - Update Version Thai Baht Text JS + add SEP
  • 1.2.1 - GoogleSheetsCellCharactersLimit
  • 1.2.0 - Dynamic เอ็ด
  • 1.1.7 - remove Googolplex
  • 1.1.3 - add LNBT
  • 1.1.1
    • Fix TB validation
    • BF is main function
    • ABT for dynamic type
  • 1.1.0 - TB Ready for Production?!
  • 1.0.9 - add TB (reverse BT)
  • 1.0.8 - add SatangNum
  • 1.0.6 - BT is main function

Flow

flowchart TD
    A(ABT) -->|input type| B{Type}
    B --> |Number| C(iTHBText)
    B --> |String| D{Allow Negative ?}
    D --> |True| E(NEG)
    D --> |False| F(BF)
    E --> F(BF)
    F --> G(BT)
    G --> |Convert Number to Decimal| H(BahtText)
    H --> I(MoneyLaundering)
    I --> J(splitIntFrac)
    J --> |moneyFull| K[/moneyFull/]
    J --> |moneyInt| L[/moneyInt/]
    J --> |moneyFrac| M[/moneyFrac/]
    K --> |moneyFull| N{Match Zero ?}
    N --> |True| P[/Zero/]
    P --> ZZZ(return)
    M --> |moneyFrac| O(PrintSatangs)
    O --> |satang_part| R
    L --> |moneyInt| Q(PrintBaht)
    Q --> |baht_part| R(Concat)
    R --> ZZZ