<commit_before>[![npm](https://nodei.co/npm/nodei.png)](https://nodei.co/npm/nodei/)

# nodei

[![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]

`nodei` executes script files and exports global declarations into the REPL.

Supports REPL commands.

The goal is to foster experimentation and rapid prototyping of JavaScript snippets.

[travis]: https://travis-ci.org/eush77/nodei
[travis-badge]: https://travis-ci.org/eush77/nodei.svg
[david]: https://david-dm.org/eush77/nodei
[david-badge]: https://david-dm.org/eush77/nodei.png

## Example

```js
$ nodei examples/foo.js
> foo
4
> printFoo()
4

/* Change examples/foo.js. */

> .reload
> foo
6<commit_msg>Inline example file in README<commit_after>[![npm](https://nodei.co/npm/nodei.png)](https://nodei.co/npm/nodei/)

# nodei

[![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]

`nodei` executes script files and exports global declarations into the REPL.

Supports REPL commands.

The goal is to foster experimentation and rapid prototyping of JavaScript snippets.

[travis]: https://travis-ci.org/eush77/nodei
[travis-badge]: https://travis-ci.org/eush77/nodei.svg
[david]: https://david-dm.org/eush77/nodei
[david-badge]: https://david-dm.org/eush77/nodei.png

## Example

foo.js:

```js
var foo = 4;

var printFoo = function () {
  return foo;
};
```

nodei repl session:

```js
$ nodei foo.js
> foo
4
> printFoo()
4

/* Change foo.js. */

> .reload
> foo
6
{'fraction_non_alphanumeric': 0.17038539553752535, 'fraction_numerical': 0.01555104800540906, 'mean_word_length': 4.342960288808665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5638800', 'n_tokens_mistral': 597, 'n_tokens_neox': 571, 'n_words': 122}