# replthis

> Spend one line of code to run a Node REPL in the console under the scope of a function on that line.

Latest version **1.0.2** (published 2018-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install replthis
pnpm add replthis
yarn add replthis
bun add replthis
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-08-23 |
| First published | 2018-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Grant Gryczan |
| Maintainers | grantgryczan |

## Links

- npm: https://www.npmjs.com/package/replthis
- Repository: https://github.com/GrantGryczan/replthis
- Homepage: https://github.com/GrantGryczan/replthis#readme
- Issues: https://github.com/GrantGryczan/replthis/issues
- npm.io page: https://npm.io/package/replthis

## Recent versions

- 1.0.2 (latest) — 2018-08-23
- 1.0.1 — 2018-06-03

## README

# replthis
Spend one line of code to run a Node REPL in the console under the scope of a function on that line.

First, enter this into the command line to install this package.
```bash
npm install replthis
```

Now here's that line I was talking about.
```js
require("replthis")(v => eval(v));
```
You can put this line anywhere in your code. It will start the JavaScript REPL once it runs, and under the scope of that arrow function. Then you should be able to enter JavaScript code into the console, pressing `enter` to evaluate it.

That's it!

This uses the built-in Node [`repl` module](https://nodejs.org/api/repl.html). Other than that, there are no dependencies and this package is super lightweight.

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