Skip to content

formats a number using fixed-point notation and returns a number

License

Notifications You must be signed in to change notification settings

joaquimserafim/number-to-fixed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

number-to-fixed

formats a number using fixed-point notation and returns a number


Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

api

const toFixed = require('number-to-fixed')

toFixed(number, [number of digits to appear after the decimal point])

for non valid numbers will return NaN and for null will return 0

example

const toFixed = require('number-to-fixed')

toFixed(123.456, 2)// should return 123.46

ISC License (ISC)

About

formats a number using fixed-point notation and returns a number

Resources

License

Stars

Watchers

Forks

Packages

No packages published