Security News
The Dark Side of Open Source
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.
web3-core-promievent
Advanced tools
Readme
This is a sub package of web3.js
This is the PromiEvent package is used to return a EventEmitter mixed with a Promise to allow multiple final states as well as chaining. Please read the documentation for more.
npm install web3-core-promievent
Build running the following in the web3.js repository:
npm run-script build-all
Then include dist/web3-core-promievent.js
in your html file.
This will expose the Web3PromiEvent
object on the window object.
// in node.js
var Web3PromiEvent = require('web3-core-promievent');
var myFunc = function(){
var promiEvent = Web3PromiEvent();
setTimeout(function() {
promiEvent.eventEmitter.emit('done', 'Hello!');
promiEvent.resolve('Hello!');
}, 10);
return promiEvent.eventEmitter;
};
// and run it
myFunc()
.then(console.log);
.on('done', console.log);
FAQs
This package extends the EventEmitter with the Promise class to allow chaining as well as multiple final states of a function.
The npm package web3-core-promievent receives a total of 386,953 weekly downloads. As such, web3-core-promievent popularity was classified as popular.
We found that web3-core-promievent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
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.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.