dessert-filesize-core
v0.4.5
Published
WASM core for Filesize module
Downloads
14
Readme
Dessert Filesize
This library is the base API for the filesize module, written in Rust for WebAssembly.
Summary
Installation
Note:
Although this module is not supposed to be used by itself, it can still be used as a standalone module.
dessert-filesize-core is depended on by dessert-filesize
npm install dessert-filesize-coreAPI
Here is a quick lookup of how you can use filesize
To know more about the api and what options are available, refer to the filesize.js module
let filesize = require('dessert-filesize-core').filesize;
let val = 500;
let options = { exponent: -2, output: "array" };
console.log(filesize(val, options));Building
The project is built using wasm-pack
To build the project, run
wasm-pack buildTesting
wasm-pack test --headless --firefox # or --chrome