gzip-size
Advanced tools
Comparing version 4.1.0 to 5.0.0
@@ -15,4 +15,2 @@ 'use strict'; | ||
// TODO: Remove below comment when new XO release is out | ||
// eslint-disable-next-line no-unused-vars, unicorn/catch-error-name | ||
return pify(zlib.gzip)(input, getOptions(options)).then(data => data.length).catch(_ => 0); | ||
@@ -58,1 +56,3 @@ }; | ||
}; | ||
module.exports.fileSync = (path, options) => module.exports.sync(fs.readFileSync(path), options); |
{ | ||
"name": "gzip-size", | ||
"version": "4.1.0", | ||
"description": "Get the gzipped size of a string or buffer", | ||
"license": "MIT", | ||
"repository": "sindresorhus/gzip-size", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"app", | ||
"tool", | ||
"zlib", | ||
"gzip", | ||
"compressed", | ||
"size", | ||
"string", | ||
"buffer" | ||
], | ||
"dependencies": { | ||
"duplexer": "^0.1.1", | ||
"pify": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"p-event": "^1.3.0", | ||
"xo": "*" | ||
} | ||
"name": "gzip-size", | ||
"version": "5.0.0", | ||
"description": "Get the gzipped size of a string or buffer", | ||
"license": "MIT", | ||
"repository": "sindresorhus/gzip-size", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"app", | ||
"tool", | ||
"zlib", | ||
"gzip", | ||
"compressed", | ||
"size", | ||
"string", | ||
"buffer" | ||
], | ||
"dependencies": { | ||
"duplexer": "^0.1.1", | ||
"pify": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"p-event": "^2.1.0", | ||
"xo": "*" | ||
} | ||
} |
@@ -59,3 +59,7 @@ # gzip-size [![Build Status](https://travis-ci.org/sindresorhus/gzip-size.svg?branch=master)](https://travis-ci.org/sindresorhus/gzip-size) | ||
### gzipSize.fileSync(path, [options]) | ||
Returns the size of the file. | ||
## Related | ||
@@ -62,0 +66,0 @@ |
72
4597
45