JSPM

repl-promised

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 347
  • Score
    100M100P100Q94687F
  • License BSD

Make any Node.js REPL support promises (Promises/A+).

Package Exports

  • repl-promised

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (repl-promised) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

repl-promised

Make any Node.js REPL support promises (Promises/A+).

Usage

Either use one of the included "node-promised" or "coffee-promised" executables, or setup your own REPL:

var repl = require("repl"); var promisify = require("repl-promised").promisify; promisify(repl.start({}));

Commands that return promises will delay printing until the promise is resolved:

Q.delay(1000).then(function() { return "output after 1 second!"; }) 'output after 1 second!'