Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=cd3606e151985d7f03cc2bae6fe1be990c8cf1f2af1e3d712f03e94b029026a8
sha512=7af281a5c1507d46562954ec979c553a9d9150fef7c66d5c3866f5b89eceae1989049fbf05d6824b30d1dbc88f4ead6bccec458b0d0b1ad53d923161c091ec62
Description
Melange bindings for the Numeral JavaScript library.
README
melange-numeral
These are the Melange bindings for numeral. 🚧 It is not completed, we are adding bindings as we go. Doesn't follow semver at this point. 🚧
Install
Install opam package manager.
Then:
opam pin add melange-numeral.dev git+https://github.com/ahrefs/melange-numeral.git#masterThe bindings support the version 2.0.6 of numeral npm package, which should be installed separately:
"dependencies": {
"numeral": "2.0.6"
}Setup
Add melange-numeral to the libraries in your dune file:
; ...
(libraries melange-numeral)
; ...Usage Example
module N = Numeral;
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
Dev Dependencies (2)
-
odoc
with-doc -
ocaml-lsp-server
with-dev-setup
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building melange-numeral with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.0.1 (this version) | n/a | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure