# jsmin2

> Another port of JSMin -- this time outputting a coordinate map

Latest version **1.2.1** (published 2016-02-01) · The Software shall be used for Good, not Evil. (see LICENSE) license · 0 weekly downloads

## Install

```sh
npm install jsmin2
pnpm add jsmin2
yarn add jsmin2
bun add jsmin2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2016-02-01 |
| First published | 2012-09-30 |
| Weekly downloads | 0 |
| License | The Software shall be used for Good, not Evil. (see LICENSE) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Todd Wolfson |
| Maintainers | twolfson |
| Keywords | jsmin, minify, minification, min, compress |

## Links

- npm: https://www.npmjs.com/package/jsmin2
- Repository: https://github.com/twolfson/node-jsmin2
- Homepage: https://github.com/twolfson/node-jsmin2#readme
- Issues: https://github.com/twolfson/node-jsmin2/issues
- npm.io page: https://npm.io/package/jsmin2

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2016-02-01
- 1.2.0 — 2016-01-12
- 1.1.9 — 2016-01-12
- 1.1.8 — 2016-01-12
- 1.1.7 — 2013-06-19
- 1.1.6 — 2012-11-06
- 1.1.5 — 2012-11-06
- 1.1.4 — 2012-10-15
- 1.1.3 — 2012-10-08
- 1.1.2 — 2012-10-08
- 1.1.1 — 2012-09-30

## README

# node-jsmin2  [![Build status](https://travis-ci.org/twolfson/node-jsmin2.svg?branch=master)](https://travis-ci.org/twolfson/node-jsmin2) [![Donate on Gittip](http://badgr.co/gittip/twolfson.png)](https://www.gittip.com/twolfson/)

Another port of JSMin -- this time outputting a coordinate map

## Getting Started
Install the module with: `npm install node-jsmin2`

## Documentation
JSMin is a function that minifies a single set of JavaScript and outputs an object with a code and codeMap.
```js
/**
 * jsmin - Refer to LICENSE in base directory
 * @param {String} input JavaScript to minifiy
 * @return {Object} retObj
 * @return {String} retObj.code Minified JavaScript
 * @return {Object} retObj.codeMap Point to point map from source JavaScript to minified JavaScript
 */
```

## Example
```js
// Load in jsmin and jQuery
var jsmin = require('node-jsmin2'),
    jquerySrc = fs.readFileSync('jquery.js', 'utf8');

// Process the jquery source via jsmin
var jqueryMinObj = jsmin(jquerySrc);

// Minified code is available at
// jqueryMinObj.code;

// Coordinate map of source code to minified code is available at
// jqueryMinObj.codeMap;
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint your code via [grunt](http://gruntjs.com/) and test via `npm test`.

## License
Copyright (c) 2012 Todd Wolfson
The Software shall be used for Good, not Evil. (see LICENSE)

---
_Source: https://npm.io/package/jsmin2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
