2.1.0 • Published 5 months ago

@pefish/js-node-assist v2.1.0

Weekly downloads
48
License
MIT
Repository
github
Last release
5 months ago

Js-node-assist

Makes JavaScript easier to use, and improve coding efficiency

Install

npm install @pefish/js-node-assist

Example

import { RoundingMode, StringUtil } from "../src/index";

console.log(StringUtil.canCastNumber(`10.12`)); // true
console.log(StringUtil.canCastNumber(`10.a`)); // false
console.log(StringUtil.start(`10.12`).remainDecimal(4, RoundingMode.ROUND_UP).end()); // 10.12
console.log(StringUtil.start(`10`).add('5').multi(10).div(5).end()); // (10 + 5) * 10 / 5 = 30
// ...