@ahrefs/bs-numeral

Bucklescript bindings for Numeral

Stats

StarsIssuesVersionUpdatedCreatedSize
@ahrefs/bs-numeral
200.1.43 years ago3 years agoMinified + gzip package size for @ahrefs/bs-numeral in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.