JSPM

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

Bankers round function to reduce the accumulated error.

Package Exports

  • bankers-round

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 (bankers-round) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Instalation

npm i bankers-round --save
yarn add bankers-round

Using

// ES5
var { bankersRound } = require('bankers-round');

// ES6
import { bankersRound } from 'bankers-round';

bankersRound(4.5) //4
bankersRound(5.5) //6
bankersRound(0.045, 2) //0.04
bankersRound(0.055, 2) //0.06