Comparing version 1.0.1 to 1.1.0
@@ -17,5 +17,5 @@ 'use strict'; | ||
var ret = format(max.length) + arrow + format(min.length); | ||
var ret = format(typeof max === 'number' ? max : max.length) + arrow + format(typeof min === 'number' ? min : min.length); | ||
if (useGzip === true) { | ||
if (useGzip === true && typeof min !== 'number') { | ||
ret += arrow + format(gzipSize.sync(min)) + chalk.gray(' (gzip)'); | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "maxmin", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -37,5 +37,5 @@ # maxmin [![Build Status](https://travis-ci.org/sindresorhus/maxmin.svg?branch=master)](https://travis-ci.org/sindresorhus/maxmin) | ||
*Required* | ||
Type: `string`, `buffer` | ||
Type: `string`, `buffer`, `number` | ||
Original string. | ||
Original string or its size in bytes. | ||
@@ -45,5 +45,5 @@ #### min | ||
*Required* | ||
Type: `string`, `buffer` | ||
Type: `string`, `buffer`, `number` | ||
Minified string. | ||
Minified string or its size in bytes. | ||
@@ -55,3 +55,3 @@ #### useGzip | ||
Show gzipped size of `min`. Pretty slow. | ||
Show gzipped size of `min`. Pretty slow. Not shown when `min` is a `number`. | ||
@@ -58,0 +58,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
3792