1. repl.history
add history to node's repl
repl.history
Package: repl.history
Created by: tmpvar
Last modified: Sun, 26 Jun 2022 11:19:35 GMT
Version: 0.1.4
License: MIT
Downloads: 16,052
Repository: https://github.com/tmpvar/repl.history

Install

npm install repl.history
yarn add repl.history

repl.history

Persist a node repl's history to a file.

from node

install: npm install repl.history

 var repl = require('repl').start('> ');
require('repl.history')(repl, process.env.HOME + '/.node_history');

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

from the command line

install: npm install -g 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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code