Comparing version 0.1.0 to 0.1.1
@@ -7,6 +7,10 @@ 'use strict'; | ||
if (!str) { | ||
return cb(0); | ||
return cb(err, 0); | ||
} | ||
gzip(str, function (err, data) { | ||
if (err) { | ||
return cb(err, 0); | ||
} | ||
cb(err, data.length); | ||
@@ -13,0 +17,0 @@ }); |
{ | ||
"name": "gzip-size", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Get the gzipped size of a string or buffer", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
# gzip-size [![Build Status](https://travis-ci.org/sindresorhus/gzip-size.png?branch=master)](https://travis-ci.org/sindresorhus/gzip-size) | ||
# gzip-size [![Build Status](https://travis-ci.org/sindresorhus/gzip-size.svg?branch=master)](https://travis-ci.org/sindresorhus/gzip-size) | ||
@@ -13,6 +13,7 @@ > Get the gzipped size of a string or buffer | ||
## Example | ||
## Usage | ||
```js | ||
var gzipSize = require('gzip-size'); | ||
var string = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.'; | ||
@@ -81,4 +82,5 @@ | ||
## License | ||
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) |
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
3290
49
85