<commit_before>random-shuffle
==============

The shuffling algorithm that DOES NOT use Math.random()
<commit_msg>added usage details<commit_after>random-shuffle
==============

The shuffling algorithm that DOES NOT use Math.random()

This algorithm uses the crypto package which makes use of /dev/random and
/dev/urandom.  Having a hardware rng will produce a better source of entropy,
but is not required.

Two public functions are exposed: **getRand(range)** and **shuffle(arr)**.

**getRand(range)** returns a random integer from [0, range)

**shuffle(arr)** shuffles the passed in array in-place.  The array can contain
elements of any type (or multiple types).

**Example:**
```
var rs = require("random-shuffle");

var arr = [123, "abc", {"field": "value"}];

// shuffle an array

rs.shuffle(x); // may return ["abc", {"field": "value"}, 123]

// or generate random numbers

rs.getRand(10); // may return 4
```

{'fraction_non_alphanumeric': 0.1579520697167756, 'fraction_numerical': 0.010893246187363835, 'mean_word_length': 4.74375, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6970297', 'n_tokens_mistral': 285, 'n_tokens_neox': 267, 'n_words': 110}