repl-inspect
v1.0.1
Published
Embed an interactive repl on runtime.
Readme
repl-inspect
Start a REPL session anywhere in your code.
Example
var foo = {
name: "Can access this",
}
var bar = {
name: "Cannot access this"
}
const add = (a, b) => a + b;
const repl = require('repl-inspect');
repl({foo: foo, anotherFooName: foo, add: add});
// > foo
// { name: 'Can access this' }
// > anotherFooName
// { name: 'Can access this' }
// > bar
// ReferenceError: bar is not defined
// > add(2, 3)
// 5
// >