GitXplorerGitXplorer
p

filesize-parser

public
25 stars
12 forks
1 issues

Commits

List of commits on branch master.
Unverified
790f2376185713ecd26b986d864d0d19461fbdd2

add units (2)

ddolsup committed 6 years ago
Unverified
c40981e7071a5ae28279d4fb611b8de1e5f9b07f

release 1.4.2

ppatrickkettner committed 7 years ago
Verified
47dc8b6b0924f8550f25079fe5ee2b59a1e3e972

Merge pull request #16 from wenboyu2/update-byte

ppatrickkettner committed 7 years ago
Unverified
95b315743fee90c1931c621e5e73ae004a3b973b

Update: add bytes to units

wwenboyu2 committed 7 years ago
Unverified
999cf989c77a79e59e32a8c174724556f163ce6f

add units

ddolsup committed 8 years ago
Unverified
a4961b8f567ead33c2daeb3b88cd57b0dbb0970b

release 1.4.1

ppatrickkettner committed 9 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