1.0.7 • Published 4 years ago
@darkwolf/numeral v1.0.7
Numeral
Install
npm i --save @darkwolf/numeral
Using
⚠️ Requires Node.js v12.x LTS or higher to use!
import Numeral from '@darkwolf/numeral'
const number = new Numeral(1024)
.add(512) // 1536
.subtract(256) // 1280
.multiply(128) // 163840
.divide(64)
number.value // 2560
const other = number
.clone()
.subtract(2048)
number.value // 2560
other.value // 512
const sum = number + other // 3072