Socket
Socket
Sign inDemoInstall

html-compress

Package Overview
Dependencies
0
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    html-compress

html compress.


Version published
Weekly downloads
167
decreased by-18.54%
Maintainers
2
Install size
42.1 kB
Created
Weekly downloads
 

Readme

Source

html compress..

对html以及smarty模板进行压缩

安装

npm install html-compress

使用方法

载入模块

var xss = require('html-compress');

设置配置参数


var option = {
    'level' : 'strip',   //压缩等级分为strip、strip_comment、strip_space,默认为strip
    'leftDelimiter' : '{%', //模板左界定符
    'rightDelimiter' : '%}' //模板右界定符
};
var HtmlCompress = require('html-compress');
var content = HtmlCompress.compress(htmlcontent,option); //传入html字符串进行压缩

测试

系统测试

在源码目录执行命令:npm test

Keywords

FAQs

Last updated on 08 Aug 2013

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