Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filesize-parser

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filesize-parser - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

2

index.js

@@ -11,2 +11,3 @@ var validAmount = function(n) {

2: [
[["b", "bits"], 1/8],
[["B", "Bytes"], 1],

@@ -27,2 +28,3 @@ [["Kb"], 128],

10: [
[["b", "bits"], 1/8],
[["B", "Bytes"], 1],

@@ -29,0 +31,0 @@ [["Kb"], 125],

2

package.json
{
"name": "filesize-parser",
"version": "1.3.2",
"version": "1.4.0",
"description": "Takes human readable filesystem size strings and gives you an int representing that many bytes.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,2 +21,6 @@ var assert = require('assert');

//passing in bits should work
assert.equal(filesizeParser('1000b'), 125);
assert.equal(filesizeParser('1000bits'), 125);
//ignore whitespace, even stupid amounts of it

@@ -23,0 +27,0 @@ assert.equal(filesizeParser('1 KB'), 1024);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc