<commit_before>[![](https://api.travis-ci.org/neogeek/iknowishouldnt.js.svg?style=flat)](https://travis-ci.org/neogeek/iknowishouldnt.js) [![](https://david-dm.org/neogeek/iknowishouldnt.js/dev-status.svg?style=flat)](https://david-dm.org/neogeek/iknowishouldnt.js/#info=devDependencies) [![Latest Documentation](https://doxdox.org/images/badge-flat.svg)](https://doxdox.org/)

#I Know I Shouldn't

A micro-library that contains snippets of code useful for modifying strings and arrays. While it does modify the native prototype of String and Array, it does so with non-enumerable methods.

##String.prototype.format

Returns a formatted string.

| Character | Type |
| --------- | ---- |
| s | String |
| i | Integer |
| f | Float |

```javascript
'rgba(%i, %i, %i, %f)'.format(255, 0, 0, 0.5);
````

```javascript
'Hello %s'.format('World!');
````

##Array.prototype.chunk

Split an array into smaller chunks.

```javascript
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].chunk(2);
````
<commit_msg>Updated README.<commit_after>[![](https://api.travis-ci.org/neogeek/iknowishouldnt.js.svg?style=flat)](https://travis-ci.org/neogeek/iknowishouldnt.js) [![](https://david-dm.org/neogeek/iknowishouldnt.js/dev-status.svg?style=flat)](https://david-dm.org/neogeek/iknowishouldnt.js/#info=devDependencies) [![Latest Documentation](https://doxdox.org/images/badge-flat.svg)](https://doxdox.org/)

#I Know I Shouldn't

A micro-library that contains snippets of code useful for modifying strings and arrays. While it does modify the native prototype of String and Array, it does so with non-enumerable methods.

##String.prototype.format

Returns a formatted string.

| Character | Type |
| --------- | ---- |
| s | String |
| i | Integer |
| d | Digit |
| f | Float |

```javascript
'rgba(%i, %i, %i, %f)'.format(255, 0, 0, 0.5);
````

```javascript
'Hello %s'.format('World!');
````

##Array.prototype.chunk

Split an array into smaller chunks.

```javascript
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].chunk(2);
````

{'fraction_non_alphanumeric': 0.20040080160320642, 'fraction_numerical': 0.021042084168336674, 'mean_word_length': 4.339572192513369, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, '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': '6085116', 'n_tokens_mistral': 792, 'n_tokens_neox': 717, 'n_words': 165}