Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esmall

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esmall

Pretty Naive

  • 4.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-37.5%
Maintainers
2
Weekly downloads
 
Created
Source

esmall

a simple minifier for for es+ code

How it works

Just a little wrapper around babili

Using the cli

$ npm install --global esmall
$ esmall input.js // output to stdout
$ esmall input.js -o output.min.js // output to file
$ cat path/to/file.js | esmall > this-works.min.js

API

Basic Usage

var Esmall = require('esmall');
var esmall = new Esmall({
  // put babili options here
});
var minified = esmall.minify('code');

Stream API

var fs = require('fs');

var Esmall = require('esmall');
var esmall = new Esmall({
  // put babili options here
});

fs.createReadStream('path/to/file.js')
  .pipe(esmall)
  .pipe(process.stdout);

This is gross

I know 🎉

TODO

  • allow cli to work with multiple files

License

Apache v2.0

FAQs

Package last updated on 20 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc