
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
A sensible deferred library
// for the sake of example, a simple log funtion
var log = function( x ) { console.log( x ); };
// so you have a deffered just like normal
var dfdA = perform.er();
dfdA.done( log, 'Yay! The deferred resolved!' );
dfdA.fail( log, 'Uh oh, it failed :(' );
// and this one
var dfdB = perform.er();
dfdB.done( log, 'B is so cool!' );
dfdB.fail( log, 'whatever....' );
// and now the reveal
perform( log, 'All done bitches' )
.when( dfdA )
.unless( dfdB );
dfdA.resolve();
dfdB.reject();
// CONSOLE:
// => Yay! The deferred resolved!
// => whatever...
// => All done bitches
As for arguments, you can still do a function like normal:
var dfdA = perform.er();
dfdA.done( function( arg1 ) {
console.log( arg1 );
});
dfdA.resolve( 'hi there' );
// CONSOLE:
// => hi there
Or specify stuff inline like this:
var doSomething = function( x, y ) {
console.log( x * y );
};
var dfdA = perform.er();
dfdA.done( doSomething, 5, perform.arg(0) );
dfdA.resolve( 20 );
// CONSOLE:
// => 100
Install the module with: npm install perform
(Coming soon)
(Coming soon)
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
(Nothing yet)
Copyright (c) 2012 Dan Heberden
Licensed under the MIT license.
FAQs
A sensible deferred library
The npm package perform receives a total of 1 weekly downloads. As such, perform popularity was classified as not popular.
We found that perform 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.