<commit_before># KeyCode Constants
[![npm version](https://img.shields.io/npm/v/keycode-js.svg?style=flat-square)](https://www.npmjs.com/package/keycode-js) [![npm downloads](https://img.shields.io/npm/dt/keycode-js.svg?style=flat-square)](https://www.npmjs.com/package/keycode-js)
[![Build Status](https://img.shields.io/travis/kabirbaidhya/keycode-js.svg?style=flat-square)](https://travis-ci.org/kabirbaidhya/keycode-js)
[![Code Climate](https://img.shields.io/codeclimate/github/kabirbaidhya/keycode-js.svg?style=flat-square)](https://codeclimate.com/github/kabirbaidhya/keycode-js)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](#contributing)

A minimal JavaScript package with Key Code constants.

## Installation

```bash
# Using npm
$ npm install keycode-js --save

# Using Yarn
$ yarn add keycode-js

# Using Bower
$ bower install keycode-js --save
```

## Usage

Include the package using CommonJS `require()` or ES2015 `import`:

```js
const KeyCode = require('keycode-js');

// ES2015+
import KeyCode from 'keycode-js';

// Import individual key code
import { KEY_RETURN } from 'keycode-js';
```

Or, using `<script>` tag:

```html
<script type="text/javascript" src="/path/to/keycode-js/dist/keycode.min.js"></script>
```

Here you go:

```js
window.addEventListener('keyup', function(e) {
    if (e.keyCode === KeyCode.KEY_RETURN) {
        console.log('It was the Return key.');
    } else {
        console.log('It was any other key.');
    }
});<commit_msg>Update README example 4 spaces -> 2 spaces<commit_after># KeyCode Constants
[![npm version](https://img.shields.io/npm/v/keycode-js.svg?style=flat-square)](https://www.npmjs.com/package/keycode-js) [![npm downloads](https://img.shields.io/npm/dt/keycode-js.svg?style=flat-square)](https://www.npmjs.com/package/keycode-js)
[![Build Status](https://img.shields.io/travis/kabirbaidhya/keycode-js.svg?style=flat-square)](https://travis-ci.org/kabirbaidhya/keycode-js)
[![Code Climate](https://img.shields.io/codeclimate/github/kabirbaidhya/keycode-js.svg?style=flat-square)](https://codeclimate.com/github/kabirbaidhya/keycode-js)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](#contributing)

A minimal JavaScript package with Key Code constants.

## Installation

```bash
# Using npm
$ npm install keycode-js --save

# Using Yarn
$ yarn add keycode-js

# Using Bower
$ bower install keycode-js --save
```

## Usage

Include the package using CommonJS `require()` or ES2015 `import`:

```js
const KeyCode = require('keycode-js');

// ES2015+
import KeyCode from 'keycode-js';

// Import individual key code
import { KEY_RETURN } from 'keycode-js';
```

Or, using `<script>` tag:

```html
<script type="text/javascript" src="/path/to/keycode-js/dist/keycode.min.js"></script>
```

Here you go:

```js
window.addEventListener('keyup', function(e) {
  if (e.keyCode === KeyCode.KEY_RETURN) {
    console.log('It was the Return key.');
  } else {
    console.log('It was any other key.');
  }
});
{'fraction_non_alphanumeric': 0.18628957885029204, 'fraction_numerical': 0.005533353827236397, 'mean_word_length': 4.821109123434705, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '271942', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1162, 'n_words': 200}