0.0.1 • Published 8 years ago

zero-out v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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