@ahrefs/bs-numeral

0.1.6 • Public • Published

bs-numeral

This is Bucklescript bindings for numeral. 🚧 It is not completed, we are adding bindings as we go. Doesn't follow semver at this point. 🚧

Install, npm

yarn add @ahrefs/bs-numeral

Setup

Add bs-numeral to bs-depenencies in your bsconfig.json!

{
  /* ... */
  "bs-dependencies": [
    "@ahrefs/bs-numeral"
  ],
  /* ... */
}

Usage Example

module N = BsNumeral;

let myValue = N.make(`Str("11110.49"));
myValue
|. N.add(`Float(123.5))
|. N.subtract(`Int(1234))
|. N.format(~format="0[.]00", ())
|. Js.log; /* 9999.99 */

Docs

Check Numeral documentation

Alternatives

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.6
    1
    • latest

Version History

Package Sidebar

Install

npm i @ahrefs/bs-numeral

Weekly Downloads

1

Version

0.1.6

License

MIT

Unpacked Size

4.21 kB

Total Files

5

Last publish

Collaborators

  • denstr
  • bryanthomaschen
  • khady
  • rustykey
  • liubko
  • feihong
  • jchavarri
  • zindel
  • germes