<commit_before>SuperHash
========

[![Build Status](https://travis-ci.org/esco/superhash.svg?branch=master)](https://travis-ci.org/esco/superhash) [![Coverage Status](https://coveralls.io/repos/esco/superhash/badge.png)](https://coveralls.io/r/esco/superhash) [![Code Climate](https://codeclimate.com/github/esco/superhash/badges/gpa.svg)](https://codeclimate.com/github/esco/superhash)

![superhash](http://i.imgur.com/JcPuyeW.png)

HashMap that supports using one or more keys of any type*

>Hash keys are generated using [multikey-hash](https://github.com/esco/multikey-hash)

## Installation

```
$ npm install superhash
```

## Examples

```js
var SuperHash = require('superhash');
var hashMap = new SuperHash();
var data = 'value';
```

Single key:
```js
hashMap.set(/.*/g, data);
hashMap.get("/.*/g"); // returns undefined
hashMap.get(/.*/g); // returns 'value'
hashMap.delete(/.*/g); // returns true
```

Multiple keys:
```js
hashMap.set(1,{ name: 'foo' }, true, data);
hashMap.get(1,{ name: 'foo' }, "true"); // returns undefined
hashMap.get(1,{ name: 'foo' }, true); // returns 'value'
hashMap.delete(1,{ name: 'foo' }, true); // returns true
```

## API
[See API.md][api-url]

## FAQ

### What types of keys can be used?

Any primitive or mutable object can be used as a key.

### Who named this module?
[@nik](http://github.com/nik)

## LICENSE
[MIT][license-url]

[license-url]: LICENSE
[api-url]: API.md<commit_msg>add simpler example<commit_after>SuperHash
========

[![Build Status](https://travis-ci.org/esco/superhash.svg?branch=master)](https://travis-ci.org/esco/superhash) [![Coverage Status](https://coveralls.io/repos/esco/superhash/badge.png)](https://coveralls.io/r/esco/superhash) [![Code Climate](https://codeclimate.com/github/esco/superhash/badges/gpa.svg)](https://codeclimate.com/github/esco/superhash)

![superhash](http://i.imgur.com/JcPuyeW.png)

HashMap that supports using one or more keys of any type*

>Hash keys are generated using [esco/multikey-hash](https://github.com/esco/multikey-hash)

## Installation

```
$ npm install superhash
```

## Examples

```js
var SuperHash = require('superhash');
var hashMap = new SuperHash();
var data = 'value';
```

Single key:
```js
hashMap.set(5, data);
hashMap.get("5"); // returns undefined
hashMap.get(5); // returns 'value'
hashMap.delete(5); // returns true
```

Multiple keys:
```js
var obj = { name: 'foo' };
hashMap.set(1, obj, true, data);
hashMap.get(1, obj, "true"); // returns undefined
hashMap.get(1, obj, true); // returns 'value'
hashMap.delete(1, obj, true); // returns true
```

## API
[See API.md][api-url]

## FAQ

### What types of keys can be used?

Any primitive or mutable object can be used as a key.

### Who named this module?
[@nik](http://github.com/nik)

## LICENSE
[MIT][license-url]

[license-url]: LICENSE
[api-url]: API.md
{'fraction_non_alphanumeric': 0.20310296191819463, 'fraction_numerical': 0.004231311706629055, 'mean_word_length': 4.6626746506986025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, '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': '390701', 'n_tokens_mistral': 1035, 'n_tokens_neox': 1002, 'n_words': 229}