A lightweight utility for formatting numbers (e.g., adding thousands separators) built for Node.js >=4.2.4. Version 0.1.5 is the latest; no frequent updates since 2016. Simpler than Intl.NumberFormat but limited to basic formatting. No dependencies.
npm install number-formatterznyakNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows the basic usage of formatting a number with commas as thousands separators using the default export.
Use 'number-formatterznyak' in package.json and all import/require statements.
Create a .d.ts file: declare module 'number-formatterznyak' { export default function nf(num: number): string; }Replace with Intl.NumberFormat: new Intl.NumberFormat('en-US').format(1234567.89) // '1,234,567.89'For large numbers, consider using a library like 'format-number' or converting to string first.
Change to require('number-formatterznyak') or import from 'number-formatterznyak'.Use import nf from 'number-formatterznyak' and then call nf(1234).
No dependency data recorded yet.