JSPM

number-to-fixed

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q33581F
  • License ISC

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

Package Exports

  • number-to-fixed

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (number-to-fixed) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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)