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

org.webjars.npm:minify

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.npm:minify

WebJar for minify

  • 4.1.3
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

Minify License Dependency Status Build Status NPM version

Minify - a minifier of js, css, html and img files. To use minify as middleware try Mollify.

Install

npm i minify -g

How to use?

CLI

$ cat > hello.js
const hello = 'world';

for (let i = 0; i < hello.length; i++) {
    console.log(hello[i]);
}
^D

$ minify hello.js
const hello="world";for(let l=0;l<hello.length;l++)console.log(hello[l]);

Code Example

minify can be used as a promise:

const minify = require('minify');

minify('./client.js')
    .then(console.log)
    .catch(console.error);

Or with async-await and try-to-catch:

const minify = require('minify');
const tryToCatch = require('try-to-catch');

async () => {
    const [error, data] = await tryToCatch(minify, './client.js');
    
    if (error)
        return console.error(error.message);
    
    console.log(data);
}();

License

MIT

FAQs

Package last updated on 24 Aug 2019

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