GitXplorerGitXplorer
p

filesize-parser

public
25 stars
12 forks
1 issues

Commits

List of commits on branch master.
Unverified
cd0aed99f5f16b01166b0041ea5e283e5cacac48

release 1.5.1

ppatrickkettner committed 4 months ago
Verified
c5cdfeb60f47c5fc6ae97d2e822024cb3b1090c6

Merge pull request #18 from np/patch-1

ppatrickkettner committed 4 months ago
Verified
f6f9be1e59f49199dfaadadd9faa0da4720373b6

Add alternative casing for kB, mB...

nnp committed 4 months ago
Unverified
7938b23701b4e87bdb7587a355eba0fd238b947f

release 1.5.0

ppatrickkettner committed 6 years ago
Verified
86db74ec97522cc05aed023add6fe3894c3f967f

Merge pull request #15 from dolsup/patch-1

ppatrickkettner committed 6 years ago
Verified
84873360dcf865b591a04bd54e74742f8ae26771

Merge branch 'master' into patch-1

ddolsup committed 6 years ago

README

The README file for this repository.

filesize-parser

Super simple module to take a human readable file size string and give you the byte representation of it.

var filesizeParser = require('filesize-parser');

filesizeParser('200kb')
204800

filesizeParser('200KB')
204800

filesizeParser('200Kb')
25600

The default base is 2, you can use base 10

var filesizeParser = require('filesize-parser');

filesizeParser('200kb', {base: 10})
200000

filesizeParser('200KB', {base: 10})
200000

filesizeParser('200Kb', {base: 10})
25000