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

repl-promise

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repl-promise

An alternative REPL implementation using Promises.

  • 0.0.2
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

repl-promise

Build Status

A REPL for determinisic processing of input for scripts that use promises.

This REPL implementation is modeled after Node's repl, but unlike several other NPM packages that have been published (see below) which enhance Node's repl in various ways, this implementation is a rewrite from scratch. It was implemented for three reasons:

  1. Node's repl and readline do not behave deterministically when the input is a file stream. See issue 3628, and in particular the comment just added requesting that the issue be reopened.
  2. Node's repl is unware of promises. However, this problem is easily addressed using an add-on such as repl-promised.
  3. As a learning exercise for the author to understand promises and in particular the package Q

This implementation does not use readline and does not provide any of the niceties that one usually expects in a console application for command history, command completion, etc.

Why is it useful then?

See problem #1 above. I'm still searching for a reasonable workaround.

In the meantime, I want to be able to use REPL sessions with input and output to/from file streams in unit tests. I want the output to be appear to be a transcript of a REPL session, so that unit tests result in useful examples.

REPL+Promises alternatives

I've experimented with the following npm packages, none of which currently meet my needs.

  1. https://www.npmjs.org/package/otaat-repl
  2. https://www.npmjs.org/package/repl-promised
  3. https://www.npmjs.org/package/repl.js

Keywords

FAQs

Package last updated on 11 Sep 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc