<commit_before># Consistent Hashing

This is a simple JavaScript implementation of consistent hashing. See https://en.wikipedia.org/wiki/Consistent_hashing for more info on consistent hashing.
<commit_msg>Update readme file<commit_after># Consistent Hashing

This is a simple JavaScript implementation of consistent hashing. See the [Wiki page](https://en.wikipedia.org/wiki/Consistent_hashing) for more info on consistent hashing.

## Usage

```javascript
var ConsistentHashing = require('./');

var nodeNames = ['node1', 'node2', 'node3', 'node4', 'node5', 'node6'];
var replicaCount = 100;

var cons = new ConsistentHashing(nodeNames, replicaCount);

var chars = [
  'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
  'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
  'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
];

chars.forEach(function(char) {
  cons.set(char, 'val-' + char);
});

console.log(cons.nodes);

cons.removeNode('node1');

console.log(cons.nodes);

```

{'fraction_non_alphanumeric': 0.196875, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 5.044025157232705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '5463579', 'n_tokens_mistral': 347, 'n_tokens_neox': 332, 'n_words': 100}