New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bitconnect-framework

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitconnect-framework

Simple interface between the console and program. (the name is intetional)

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

bitconnect

Simple interface between the console and program. (the name is intentional)

Usage


const bitconnect = require('bitconnect-framework');

bitconnect.prefix("$ "); // set prefix to watever (default '> ')

// # warning, do not use console.log, instead use log function given # //

bitconnect.on('bepis', (log) => {
  log("ayy");
})

bitconnect.on('conke', (log) => {
  log("nooo");

  bitconnect.prompt('change? ', function (answer, log) { // ask use to change
    log(answer); // log their input
    log('better be yes...');
  })

})

bitconnect.on('stop', (log) => {
  bitconnect.pause();

  // here no input will be received
  // safe to use console.log

  setTimeout(function () {
    bitconnect.resume(); // use will be re-prompted
  }, 5000);
})

bitconnect.onError((line, log) => { // if bitconnect cant find a matching handler
  log(`Unkown: ${line}`); // log watever
})

bitconnect.ready(); // call to start up bitconnect

FAQs

Package last updated on 27 Mar 2019

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