4.0.1 • Published 1 year ago
pretty-repl v4.0.1
Pretty REPL
An extension of the Node REPL (repl.REPLServer
) that applies syntax highlighting as the user types.
How to use it
Install the package:
$ npm install --save pretty-repl
Use the package:
const repl = require('pretty-repl');
const options = {
prompt: '→ '
};
repl.start(options);
options
is an an object with the same options as repl.REPLServer
.
Additionally, it's possible to pass an additional colorize
property to the options object:
{
colorize: function (str) {
// str is the the string in input.
// the function should return the string that has been colorized to output in the REPL.
}
}
In order to highlighting matching pairs of brackets, a colorizeMatchingBracket
is also available.
Credits
Pretty repl is inspired and includes code fragments from:
4.0.1
1 year ago
3.1.2
2 years ago
4.0.0
2 years ago
3.1.1
4 years ago
3.1.0
4 years ago
3.0.2
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.4.0
5 years ago
2.3.1
5 years ago
2.3.0
5 years ago
2.2.1
5 years ago
2.1.2
5 years ago
2.2.0
5 years ago
2.1.3
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago