Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

interactive

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interactive

Togglable interactive mode


Version published
Weekly downloads
121
decreased by-9.02%
Maintainers
1
Weekly downloads
 
Created

interactive

A simple togglable interactive mode for node.js.

You can start and stop it from any place in your code. It allows you to interact with your global objects and evaluate new pieces. You can use arrow keys to navigate through commands you ran.

Please note that it switches stdin to rawMode, so if you have any listeners on it, it's best to close them first.

There are two functions available:

  • start([name]);
    • Starts interactive mode
    • If name is specified it's printed at the beginning of interactive session
  • stop();
    • Stops interactive mode

To quit type :q

Example usage:

var interactive = require('interactive');
interactive.start('Point 1');

//Interactive mode started at: Point 1
//> console.log(5)
//5
//undefined
//> :q
//Interactive mode off

Licensed under MIT license. Copyright (c) 2014 Adam Paszke

FAQs

Package last updated on 23 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts