1.0.0 • Published 4 years ago
ccunits-rust v1.0.0
ccunits-rust
Rust implementation of ccunits, wasm-ready
Requirements
- wasm-pack
build
- Web:
wasm-pack build --target web - Bundler:
wasm-pack build --target bundler - Node:
wasm-pack build --target node
wasm usage
import * as ccunits from 'ccunits-rust'
const mins = ccunits.to_minimal('134.677452125', 18) // "134677452125000000000"
const currency = ccunits.from_minimal('134677452125000000000', 18) // '134.677452125'