# REPL

> REPL environment.


<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->

<section class="intro">

</section>

<!-- /.intro -->

<!-- Package usage documentation. -->

<section class="usage">

## Usage

``` javascript
var repl = require( '@stdlib/repl' );
```

#### repl( \[options\], clbk )

Starts a REPL environment.

``` javascript
repl( onStart );

function onStart( error, r ) {
    if ( error ) {
        throw error;
    }
}
```

</section>

<!-- /.usage -->

<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<!-- Package usage examples. -->

<section class="examples">

## Examples

``` javascript
var repl = require( '@stdlib/repl' );

// Start the REPL:
repl( onStart );

function onStart( error, r ) {
    if ( error ) {
        throw error;
    }
    // After the REPL has started, exit the process...
    setTimeout( onTimeout, 2500 );

    function onTimeout() {
        r.close();
    }
}
```

</section>

<!-- /.examples -->


---

<section class="cli">

## CLI

<section class="usage">

### Usage

``` bash
Usage: stdlib-repl [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.
```

</section>

<!-- /.usage -->


<section class="examples">

### Examples

``` bash
$ stdlib-repl
Starting REPL...
```

</section>

<!-- /.examples -->

</section>

<!-- /.cli -->

<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="references">

</section>

<!-- /.references -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

</section>

<!-- /.links -->
