Socket
Socket
Sign inDemoInstall

mini-html

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mini-html

Minifies a block of HTML or a HTML file


Version published
Weekly downloads
9
Maintainers
1
Install size
3.23 kB
Created
Weekly downloads
 

Readme

Source

miniHTML

A very simple HTML minifier. It will almost definitely break your site if you use PRE or CODE or TEXTAREA with formatting defined by line breaks and tabs etc. Otherwise it will aggressively shrink your HTML.

Usage

Import the node module:

`npm install mini-html`

Minify a HTML file:

var miniHTML = require("mini-html");
var minimized = miniHTML("<html> \n\t<head> \n\t<.......\n\n\n\n\n\t\t\t\t\t\t\t\t\t<body>..."); 
console.log(minimized); // <html><head><..........

Minify a HTML file:

var minimized = miniHTML(null, __dirname + "/index.html");

Minify a HTML file and save it

miniHTML(null, __dirname + "/index.html", true);

Keywords

FAQs

Last updated on 07 May 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc