1.0.0 • Published 7 years ago

number-to-fixed v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

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)