Comparing version 1.1.0 to 2.0.0
@@ -13,6 +13,2 @@ 'use strict'; | ||
module.exports = function (max, min, useGzip) { | ||
if (max == null || min == null) { | ||
throw new Error('`max` and `min` required'); | ||
} | ||
var ret = format(typeof max === 'number' ? max : max.length) + arrow + format(typeof min === 'number' ? min : min.length); | ||
@@ -19,0 +15,0 @@ |
{ | ||
"name": "maxmin", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)", | ||
@@ -10,9 +10,9 @@ "license": "MIT", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "http://sindresorhus.com" | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=0.12" | ||
}, | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "xo && ava" | ||
}, | ||
@@ -37,8 +37,9 @@ "files": [ | ||
"figures": "^1.0.1", | ||
"gzip-size": "^1.0.0", | ||
"pretty-bytes": "^1.0.0" | ||
"gzip-size": "^3.0.0", | ||
"pretty-bytes": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
} |
@@ -12,3 +12,3 @@ # maxmin [![Build Status](https://travis-ci.org/sindresorhus/maxmin.svg?branch=master)](https://travis-ci.org/sindresorhus/maxmin) | ||
```sh | ||
``` | ||
$ npm install --save maxmin | ||
@@ -21,10 +21,10 @@ ``` | ||
```js | ||
var maxmin = require('maxmin'); | ||
const maxmin = require('maxmin'); | ||
var max = 'function smoothRangeRandom(min,max){var num=Math.floor(Math.random()*(max-min+1)+min);return this.prev=num===this.prev?++num:num};'; | ||
const max = 'function smoothRangeRandom(min,max){var num=Math.floor(Math.random()*(max-min+1)+min);return this.prev=num===this.prev?++num:num};'; | ||
var min = '(function(b,c){var a=Math.floor(Math.random()*(c-b+1)+b);return this.a=a===this.a?++a:a})()'; | ||
const min = '(function(b,c){var a=Math.floor(Math.random()*(c-b+1)+b);return this.a=a===this.a?++a:a})()'; | ||
console.log(maxmin(max, min, true)); | ||
//=> 130 B → 91 B → 53 B (gzip) | ||
//=> '130 B → 91 B → 53 B (gzip)' | ||
``` | ||
@@ -34,7 +34,6 @@ | ||
### maxmin(max, min, useGzip) | ||
### maxmin(max, min, [useGzip]) | ||
#### max | ||
*Required* | ||
Type: `string`, `buffer`, `number` | ||
@@ -46,3 +45,2 @@ | ||
*Required* | ||
Type: `string`, `buffer`, `number` | ||
@@ -49,0 +47,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3687
2
16
57
+ Addedduplexer@0.1.2(transitive)
+ Addedgzip-size@3.0.0(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedpretty-bytes@2.0.1(transitive)
- Removedbrowserify-zlib@0.1.4(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedconcat-stream@1.6.2(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedgzip-size@1.0.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedpako@0.2.9(transitive)
- Removedpretty-bytes@1.0.4(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedtypedarray@0.0.6(transitive)
- Removedutil-deprecate@1.0.2(transitive)
Updatedgzip-size@^3.0.0
Updatedpretty-bytes@^2.0.1