4.0.0 • Published 1 year ago
bare-repl v4.0.0
bare-repl
Read-Evaluate-Print-Loop environment for JavaScript.
npm i bare-replUsage
const { start } = require('bare-repl')
const repl = start()API
const repl = start([options])
Options include:
{
prompt: string, // sets repl prompt
useColors: boolean, // toogles ANSI style codes to colorize the output
writer: (message) => message, // converts repl output
input: stream, // sets repl input stream
output: stream, // sets repl output stream
eval: (cmd) => {} // sets eval function
}repl.defineCommand(keyword, { help, action })
Define a repl command keyword.
repl.defineCommand('greet', {
help: 'Greetings',
action: () => console.log('hello')
})bare-repl
> .greet
hellorepl.context
Set execution context.
repl.context.f = () => console.log('Hello from context')bare-repl
> f()
Hello from contextLicense
Apache-2.0
4.0.0
1 year ago
3.0.2
1 year ago
2.0.5
1 year ago
2.0.7
1 year ago
2.0.6
1 year ago
2.0.8
1 year ago
3.0.1
1 year ago
3.0.0
1 year ago
2.0.4
1 year ago
2.0.3
1 year ago
2.0.2
1 year ago
2.0.1
2 years ago
2.0.0
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.6.1
2 years ago
0.6.0
2 years ago
0.3.0
2 years ago
0.5.0
2 years ago
0.4.1
2 years ago
0.3.2
2 years ago
0.4.0
2 years ago
0.3.1
2 years ago
0.5.1
2 years ago
0.2.0
2 years ago
0.1.8
2 years ago
0.1.9
2 years ago
0.1.0
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.0.2
2 years ago
0.1.7
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.0.1
3 years ago
0.0.0
3 years ago