Skip to content

mleko/js-prefix-si

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prefix-si

SI, IEC, BS1852 compatible number formatter

Travis Status

Install

$ npm install prefix-si

Usage

prefix = require("prefix-si").prefix
// import { prefix } from "prefix-si"


prefix(1024*1024, "B", {binary: true})
// => "1MiB"

prefix(1200, "g")
// => "1.2kg"

prefix(4700, "R", {bs1852: true})
// => "4K7"

About

SI, IEC, BS1852 compatible number formatter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published