Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 488 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 488 Bytes

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'