Registry / devops / number-formatter-msenyoo

number-formatter-msenyoo

JSON →
library2.1.0jsnpmunverified

A small library that adds commas to numbers. Current stable version is 2.1.0. It is a simple, dependency-free utility for formatting numbers with thousands separators. The library has been stable with infrequent releases. It provides a single function that takes a number and returns a string with commas. Differentiators: minimalistic, no dependencies, straightforward API for a common formatting task.

npm install number-formatter-msenyoo
INSTALL
IMPORT
SIG · NUMBER-FORMATTER-M
N
number-formatter-msenyoo
devopsjavascriptv2.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

numFormatter
const numFormatter = require('number-formatter-msenyoo'); numFormatter(123456789);
CommonJS require pattern. No ES module export provided.

Demonstrates basic usage of the formatter to add commas to a number.

const numFormatter = require('number-formatter-msenyoo'); console.log(numFormatter(123456789)); // '123,456,789'
Debug
Known issues
gotchaNo ES module support; cannot use import statement.
fix
Use require() for CommonJS or wrap with createRequire in ES modules.
affects: >=2.0.0
gotchaThe function expects a number; passing a string may cause unexpected behavior.
fix
Convert input to number: numFormatter(Number(value))
affects: all
Errors
Common errors & fixes
TypeError: numFormatter is not a function
Incorrect import; likely used import statement or destructured incorrectly.
fix
Use const numFormatter = require('number-formatter-msenyoo'); not import { numFormatter } from 'number-formatter-msenyoo';
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
number-formatter-msenyoo — npm install number-formatter-msenyoo · libregistry