# instant-replay

> REPL playground, built instantly from your dependencies

Latest version **2.0.0** (published 2024-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install instant-replay
pnpm add instant-replay
yarn add instant-replay
bun add instant-replay
```

Provides the command `replay`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2024-02-03 |
| First published | 2019-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jake McKown |
| Maintainers | jakemckown |
| Keywords | repl, playground, prototyping |

## Links

- npm: https://www.npmjs.com/package/instant-replay
- Repository: https://github.com/jakemckown/instant-replay
- Homepage: https://github.com/jakemckown/instant-replay#readme
- Issues: https://github.com/jakemckown/instant-replay/issues
- npm.io page: https://npm.io/package/instant-replay

## Dependencies (1)

- [find-up](https://npm.io/package/find-up.md) ^7.0.0

## Recent versions

- 2.0.0 (latest) — 2024-02-03
- 1.1.3 — 2020-01-24
- 1.1.2 — 2020-01-24
- 1.1.1 — 2019-07-29
- 1.1.0 — 2019-07-29
- 1.0.0 — 2019-07-28
- 0.2.0 — 2019-07-28
- 0.1.1 — 2019-07-28
- 0.1.0 — 2019-07-28

## README

<h1 align="center">Instant REPLay</h1>
<p align="center">REPL playground, built instantly from your dependencies</p>
<br>

## Usage

### Command

```
$ node_modules/.bin/replay [options]
```

### Script

`package.json`
```json
{
  "scripts": {
    "replay": "replay [options]"
  },
  "dependencies": {
    "faker": "^4.1.0",
    "lodash": "^4.17.12"
  }
}
```

#### NPM
```
$ npm run replay
```

#### Yarn
```
$ yarn replay
```

### Options

| Option      | Alias | Description                                                                                   |
|:----------- |:----- |:--------------------------------------------------------------------------------------------- |
| `--version` | `-v`  | Show version number.                                                                          |
| `--help`    | `-h`  | Show help.                                                                                    |
| `--output`  | `-o`  | Specify output file, such as `replay -o "./path/to/file.js"`. The default is `./bin/repl.js`. |

### REPL

#### Run REPL
```
$ node ./bin/repl.js
>
```

#### See available dependencies
```
> deps
[ 'faker', 'lodash' ]
>
```

#### See available devDependencies
```
> devDeps
[ '' ]
>
```

#### Load dependency
```
> load('faker')
'+faker'
> faker.name.firstName()
'Jake'
>
```

#### Load dependency with alias
```
> load('lodash', '_')
'+_'
> _.add(1, 2)
3
> lodash.add(1, 2)
Thrown:
ReferenceError: lodash is not defined
>
```

#### Load Node modules
```
> load('fs')
'+fs'
> load('path')
'+path'
>
```

#### Unload dependencies/modules
```
> unload('faker', '_', 'fs', 'path')
'-faker, -_, -fs, -path'
>
```

#### Exit REPL
```
> exit
$
```
or

```
> quit
$
```

## Installation

#### NPM
```
$ npm i -D instant-replay
```

#### Yarn
```
$ yarn add -D instant-replay
```

---
_Source: https://npm.io/package/instant-replay · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
