package
Extends repl.REPLServer to allow for a colorize function
npm install pretty-replGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
An extension of the Node REPL (repl.REPLServer) that applies syntax highlighting as the user types.

Install the package:
$ npm install --save pretty-replUse 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.
Pretty repl is inspired and includes code fragments from:
kristina.stefano
kristina.stefanova@mongodb.com
Estimated unpacked size across 10 packages.
5.5 MB
Includes dependencies.
4 direct · 4 outdated
^4.1.1
6.0.1
^4.2.0
7.0.0
^5.0.1
6.6.0
^6.0.0
7.2.0