Nuclear Powered Marshmallows

    pretty-repl
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.1 • Public • Published

    Pretty REPL

    Node.js CI

    An extension of the Node REPL (repl.REPLServer) that applies syntax highlighting as the user types.

    Pretty REPL Screenshot

    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:

    Install

    npm i pretty-repl

    DownloadsWeekly Downloads

    6,000

    Version

    3.1.1

    License

    MIT

    Unpacked Size

    126 kB

    Total Files

    13

    Last publish

    Collaborators

    • mabaasit
    • alexander_schroll
    • chuck.kalmanek
    • mongodb-js-user
    • rueckstiess
    • durran
    • lerouxb
    • fredtruman
    • mbroadst
    • hswolff
    • satyasinha
    • matt_d_rat
    • rhysm
    • tomhollander
    • alena.khineika
    • jeff-allen-mongo
    • mmarcon
    • jonathan.balsano
    • mongodb-build
    • jack.weir
    • stennie
    • mcasimir
    • kristina.stefano
    • jarjee
    • shaketbaby
    • devtoolsbot
    • addaleax
    • gribnoysup
    • mutukrish