This package has been deprecated

Author message:

No longer maintained.

strmin

0.2.1 • Public • Published

Strmin

A simple tool for compressing JavaScript string.

Main

dist/
├── strmin.js      (6 KB)
└── strmin.min.js  (3 KB)

Getting started

Quick start

Usage

var strmin = new Strmin(options);
 
strmin.compress(source, function (result) {
  console.log(result);
});

Options

escape

  • type: String
  • options: '"', "'"
  • default: '"'

Escape the quotation mark.

report

  • type: Boolean
  • default: true

Report the result length on the console.

strict

  • type: Boolean
  • default: true

The result length must be less than the source length. If not, the source will be return as the result.

Methods

setup(options)

Change the default options.

compress(source[, callback])

Compress source string.

Browser Support

  • Chrome 36+
  • Firefox 31+
  • Internet Explorer 9+
  • Opera 21+
  • Safari 5.1+

License

Released under the MIT license.

Package Sidebar

Install

npm i strmin

Weekly Downloads

0

Version

0.2.1

License

MIT

Last publish

Collaborators

  • chenfengyuan