gerardolima-number-formatter

1.0.7 • Public • Published

npm

This is a personal study on the necessary steps to create, publish and consume a npm package. I am following this nice tutorial from Joanne at medium.com.

This package exports Joanne's implementation of a function to add commas to numbers.

Installation

npm install gerardolima-number-formatter

Usage

var numFormatter = require('gerardolima-number-formatter');

var formattedNum = numFormatter(35666);

Output should be 35,666

Build

Currenly this repository package only relies on npm scripts.

npm run clean

npm run build

Currenntly, these scripts need to run on bash, so that the continuous integration and the coverage tests run properly. To run them on windows, you need to create an evironment variable to inform npm to use bash, instead of the standard command interpreter (more information here).

export "comspec=C:\Program Files\Git\git-bash.exe"

I am intending to use Gulp to avoid these kind of system specifities.

Tests

npm test

Code status

Build Status Coverage Status

/gerardolima-number-formatter/

    Package Sidebar

    Install

    npm i gerardolima-number-formatter

    Weekly Downloads

    3

    Version

    1.0.7

    License

    MIT

    Last publish

    Collaborators

    • gerardolima