Package Exports
- bankers-round
- bankers-round/lib/index.js
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
Bankers round function to reduce the accumulated error. Module written in TS.
Installation
npm i bankers-round --save
yarn add bankers-roundUsing
// 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