<commit_before>lz-node-utils
=============

Useful utility functions for node.

# Usage

```bash
npm install --save-dev git+http://git@github.com/lzilioli/lz-node-utils.git
```

```javascript
var util = require( 'lz-node-utils' );
```

## Methods

### `util.file`

The following were taken from [`grunt.file`](https://github.com/gruntjs/grunt/blob/master/lib/grunt/file.js), with the grunt dependancy removed.

- `file.expand`
- `file.expandMapping`
- `file.read`
- `file.exists`
- `file.readJSON`
- `file.readYAML`
- `file.mkdir`

### `util.reqfn(rootDir)`

Returns a function that, when called, will require a module relative to `rootDir`.
<commit_msg>fix typo in readme<commit_after>lz-node-utils
=============

Useful utility functions for node.

# Usage

```bash
npm install --save-dev git+http://git@github.com/lzilioli/lz-node-utils.git
```

```javascript
var util = require( 'lz-node-utils' );
```

## Methods

### `util.file`

The following were taken from [`grunt.file`](https://github.com/gruntjs/grunt/blob/master/lib/grunt/file.js), with the grunt dependency removed.

- `file.expand`
- `file.expandMapping`
- `file.read`
- `file.exists`
- `file.readJSON`
- `file.readYAML`
- `file.mkdir`

### `util.reqfn(rootDir)`

Returns a function that, when called, will require a module relative to `rootDir`.

{'fraction_non_alphanumeric': 0.18888042650418888, 'fraction_numerical': 0.0, 'mean_word_length': 4.256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5021014', 'n_tokens_mistral': 495, 'n_tokens_neox': 472, 'n_words': 105}