Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including mind-the-bulk with all npm packages installed. Try it out:

var mindTheBulk = require("mind-the-bulk")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mind-the-bulk v0.0.3

[![devDependency Status]( the bulk/dev-status.svg)]( the bulk#info=devDependencies)

mind the bulk

A (very) simple utility to size of files containing JavaSript source code. It will report file size in its raw, minified ad gziped form. useful for tracking deliverables' size.


var getSizes = require('mind-the-bulk');
var sizes = getSizes(['file1.js', 'file2.js']);

This module exports a simple function that accepts an array of paths to files. The function will return an object where keys are equal to file's basename and values are of the following structure (sizes are in bytes):

{ "raw": 228,
  "min": 200,
  "gzip": 173}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free