@vukanac/number-formatter

1.0.1 • Public • Published

Number Formatter (this is only a NPM Demo)

Build Status Coverage Status

A small library that adds commas to numbers

Installation

npm install @vukanac/number-formatter

Usage

var numFormatter = require('@vukanac/number-formatter');

var formattedNum = numFormatter(35666);

Output should be 35,666

Tests

npm test

Contributing

All new functionality or changes must be linted and covered with unit tests.

npm run lint
npm test

Steps done:

git init
git push origin
npm login
npm publish
npm install --save <number-formatter>
npm unpublish

Supporting steps:

hub create
travis init
travis enable
npx eslint --init

Troubleshooting

npm publish

Required one time password (OTP) from 2FA enabled accounts.

It the result is:

npm ERR! 402 Payment Required
 - PUT https://registry.npmjs.org/@<YOUR_USERNAME>%2fnumber-formatter
 - You must sign up for private packages

Run:

npm publish --access=public

or change the scope from private (organisation) based on your username to the global scope by changing the name in package.json:

-  "name": "@<YOUR_USERNAME>/number-formatter",
+  "name": "number-formatter-with-locale",

Package Sidebar

Install

npm i @vukanac/number-formatter

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

4.37 kB

Total Files

7

Last publish

Collaborators

  • vukanac