@darkwolf/numeral.cjs
v1.0.4
Published
Numeral
Downloads
18
Maintainers
Readme
Numeral
Install
ECMAScript (Node.js v12.x LTS or higher)
npm i --save @darkwolf/numeral.mjs
CommonJS (Node.js v10.x LTS or higher)
npm i --save @darkwolf/numeral.cjs
Using
// ECMAScript
import Numeral from '@darkwolf/numeral.mjs'
// CommonJS
const Numeral = require('@darkwolf/numeral.cjs')
const number = new Numeral(1024)
.add(512) // => 1536
.subtract(256) // => 1280
.multiply(128) // => 163840
.divide(64)
.subtract(2048)
number.value // => 512