<commit_before># Bestikk Uglify

ifdef::env-github[]
image:http://img.shields.io/travis/bestikk/bestikk-uglify.svg[Travis build status, link=https://travis-ci.org/bestikk/bestikk-uglify]
image:http://img.shields.io/npm/v/bestikk-uglify.svg[npm version, link=https://www.npmjs.org/package/bestikk-uglify]
endif::[]

A simple tool to uglify JavaScript files based on Google Closure Compiler.

## Install

 $ npm i --save-dev bestikk-uglify

## Usage

IMPORTANT: Google Closure Compiler requires Java 7 or higher and `java` binary must be available in your `PATH`.

```javascript
var uglify = require('bestikk-uglify');

uglify.minify('index.js', 'index.min.js');
uglify.minify('index.js', 'index.min.js', callback); // <1>
```
<1> `minify` function has an optional `callback` argument.<commit_msg>Remove semicolon in the README code sample<commit_after># Bestikk Uglify

ifdef::env-github[]
image:http://img.shields.io/travis/bestikk/bestikk-uglify.svg[Travis build status, link=https://travis-ci.org/bestikk/bestikk-uglify]
image:http://img.shields.io/npm/v/bestikk-uglify.svg[npm version, link=https://www.npmjs.org/package/bestikk-uglify]
endif::[]

A simple tool to uglify JavaScript files based on Google Closure Compiler.

## Install

 $ npm i --save-dev bestikk-uglify

## Usage

IMPORTANT: Google Closure Compiler requires Java 7 or higher and `java` binary must be available in your `PATH`.

```javascript
var uglify = require('bestikk-uglify')

uglify.minify('index.js', 'index.min.js')
  .then(() => /* do something * /) // <1>
```
<1> `minify` function returns a `Promise`.
{'fraction_non_alphanumeric': 0.15413771320277952, 'fraction_numerical': 0.003790271636133923, 'mean_word_length': 4.823529411764706, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3333896', 'n_tokens_mistral': 581, 'n_tokens_neox': 560, 'n_words': 135}