babel-n_

0.1.2 • Public • Published

babel-n_

A REPL for Babel that allows binding to the _ variable. In a typical REPL, _ is bound to the previous input. Out of the box, babel-n_ binds lodash to _.

Installing

npm install -g babel-n_

Accessing the REPL

After installing, the babel-n_ REPL is accessible via the bn_ global command.

$ bn_
bn_> var {hello} = {name: 'me!', hello: 'Is it me you\'re lookin\' for?'};
'use strict'
bn_> hello
'Is it me you\'re lookin\' for?'
bn_> _.contains(hello, 'lookin');
true

Using Other Libraries

Currently, there is no API for binding alternatives to lodash to _, such as lodash-fp or underscore. Keep in mind, you can always require a library into the REPL, so long as node can see it and you don't mind using another variable. Pull requests are also welcome for an API that doesn't require modifying the code to use any given library for _;

Acknowledgements

This project is simply a hack-up of babel-node from the babel project and n_.

Dependencies (8)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i babel-n_

    Weekly Downloads

    2

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • esjay