New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

format-si-prefix

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

format-si-prefix

Format and unformat numbers with SI prefixes

latest
Source
npmnpm
Version
0.3.2
Version published
Weekly downloads
12K
-48.75%
Maintainers
1
Weekly downloads
 
Created
Source

format-si-prefix

npm David David

Format and unformat numbers with SI prefixes.

API

formatSI()

import {formatSI} from 'format-si-prefix';
const string = formatSI(number);
inout
......
0.000111111111µ
0.001111.11m
0.011111.1m
0.111111m
11
1111
111111
11111.11k
1111111.1k
111111111k
11111111.11M
......

unformatSI()

import {unformatSI} from 'format-si-prefix';
const number = unformatSI(string);
inout
......
111µ0.000111
1.11m0.00111
11.1m0.0111
111m0.111
11
1111
111111
1.11k1110
11.1k11100
111k111000
1.11M1110000
......
12.345M12345000
12.34512.345
12345671234567
123456M123456000000
1000.1m1.0001
......

License

MIT

Keywords

parse

FAQs

Package last updated on 27 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts