Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
promirepl
Advanced tools
Changelog
v2.0.1 (2019-03-02)
break.
Readme
A promise infused REPL.
Promirepl provides a Node.js REPL which will automagically unwrap promise values. It also is Node module, with a function that can add these magical promise inspecting capabilities to your own custom REPLs.
This allows you to use promise based APIs from the REPL just as easily as old
fashioned synchronous APIs, without a lot of messing around with callbacks and
console.log
to get at asynchronous values from the REPL.
Promirepl can be installed with npm install -g promirepl
. This installs the
prominode
executable, which starts a Node.js REPL that has magical promise
unwraping capabilities.
$ prominode
Whenever a value evaluates to a promise (well, technically a thenable), promirepl will wait for the promise to resolve.
> Promise.resolve('hello')
'hello'
> new Promise((resolve) => {
... setTimeout(() => { resolve('some time later'); }, 3000);
... })
'some time later'
If the promise is rejected, it will evaluate as a thrown error.
> Promise.reject(new Error('boom'))
Error: boom
at repl:1:16
at REPLServer.defaultEval (repl.js:135:27)
If you would like to stop waiting on a promise, hit escape.
> new Promise(function () {})
Hit escape to stop waiting on promise
break.
If you would like to disable promise unwrapping, enter the .promise
command.
> .promise
Promise auto-eval disabled
> Promise.resolve('hello')
{}
> Promise.reject(new Error('boom'))
{}
If you would like to use promirepl within your own custom REPL, use the
exported promirepl
function.
const customRepl = createCustomRepl();
const { promirepl } = require('promirepl');
promirepl(customRepl.start({}));
FAQs
Promise infused REPL
The npm package promirepl receives a total of 1,213 weekly downloads. As such, promirepl popularity was classified as popular.
We found that promirepl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.