shuding/nstr is one of the open-source repositories TopGit tracks, currently at 664 stars, written primarily in TypeScript. number → string, but looks good
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
npm install nstr
# or
pnpm add nstr
# or
yarn add nstr
Usage
Basic Usage
import nstr from 'nstr'
// Just wrap any number
const result = nstr(0.1 + 0.2) // "0.3"
// Works with any arithmetic
nstr(price * rate * taxRate) // Clean decimals
nstr(mouseX - startX) // Perfect for transforms
nstr(Math.random() * 100) // Clean random numbers
The algorithm detects floating-point artifacts by looking for consecutive identical digits (0s or 9s) longer than the threshold. When found, it intelligently truncates or rounds to produce clean results.
Yes — shuding/nstr ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/shuding/nstr.
What is shuding/nstr?
shuding/nstr (shuding/nstr) is a TypeScript project on GitHub. From the project's own README: number → string, but looks good
Where do I read more about shuding/nstr?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/shuding/nstr is the definitive source.
Read full README in the tab above.
Curious whether nstr is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about nstr.