Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@andfaulkner/repl.history

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andfaulkner/repl.history

Add history to node's repl (working with node 16+)

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

repl.history

Persist a node repl's history to a file (now working with node v16+).

from node

install: npm install repl.history

const os = require('os');
const path = require('path');

const historyFile = path.join(os.homedir(), '.node_history');

const repl = require('repl').start('> ');
require('repl.history')(repl, historyFile);

this will drop a .node_history file in your home directory.

from the command line

install: npm install -g @andfaulkner/repl.history

run repl.history on the command line

A file ~/.node_history will be created.

I like to alias it to nr for node repl. To do this, add the following to your ~/.bashrc file:

alias nr="repl.history"

FAQs

Package last updated on 21 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts