Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

filesizegzip

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

filesizegzip

Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)

    2.0.0latest

Version published
Maintainers
1
Yearly downloads
10,045
decreased by-81.72%

Weekly downloads

Readme

Source

filesizegzip Build Status

Get a pretty output of the original & gzipped size of a string or buffer

Useful for logging the difference between original and minified file in e.g. a build-system.

Install

$ npm install --save filesizegzip

Usage

var filesizegzip = require('filesizegzip'); var src = '(function(b,c){var a=Math.floor(Math.random()*(c-b+1)+b);return this.a=a===this.a?++a:a})()'; console.log(filesizegzip(src, true)); //=> 91 B → 53 B (gzip)

API

filesizegzip(src, useGzip)

max

Required
Type: string, buffer, number

Original string or its size in bytes.

useGzip

Type: boolean
Default: false

Show gzipped size of src. Pretty slow. Not shown when src is a number.

License

MIT © Zander Martineau

Keywords

FAQs

What is filesizegzip?

Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)

Is filesizegzip popular?

The npm package filesizegzip receives a total of 143 weekly downloads. As such, filesizegzip popularity was classified as not popular.

Is filesizegzip well maintained?

We found that filesizegzip demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 03 Oct 2015
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc