zero-out

0.0.1 • Public • Published

zero-out

Zero out (round-out/approximate) numerical values: 123,456,789123,000,000

Build Status

Install

$ npm install --save zero-out

Usage

const zeroOut = require('zero-out');
 
zeroOut('123,456,789');
//=> '123,000,000'

API

zeroOut(input, [options])

input

Type: string|number

The value you want to round out.

options

up

Type: boolean
Default: false

Round the value up. 12,345,78913,000,000

down

Type: boolean
Default: false

Round the value down. 12,345,78911,000,000

pad

Type: string
Default: 0

Custom pad the values. 12,345,78912,xxx,xxx

License

MIT © Michael Wuergler

Package Sidebar

Install

npm i zero-out

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • radiovisual