Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
mini-signals
Advanced tools
signals, in JavaScript, fast
Custom event/messaging system for JavaScript inspired by js-signals originally based on EventEmitter3 code base.
There are several advantages to signals over event-emitters (see Comparison between different Observer Pattern implementations). However, the current implementation of js-signals is (arguably) slow compared to other implementations (see EventsSpeedTests). mini-signals
is a fast, minimal emitter, with an API similar to js-signals.
npm install mini-signals
jspm install mini-signals=github:Hypercubed/mini-signals
bower install mini-signals
When not using a module loader the mini-signals constructor (MiniSignal
) is global.
var MiniSignal = require('mini-signals');
var mySignal = new MiniSignal();
var binding = mySignal.add(onSignal); //add listener
mySignal.dispatch('foo', 'bar'); //dispatch signal passing custom parameters
binding.detach(); //remove a single listener
function onSignal(foo, bar) {
assert(foo === 'foo');
assert(bar === 'bar');
}
var Signal = require('mini-signals');
var myObject = {
foo: 'bar',
updated: new MiniSignal()
}
myObject.updated.add(onUpdated, myObject); //add listener with context
myObject.foo = 'baz';
myObject.updated.dispatch(); //dispatch signal
function onUpdated() {
assert(this === myObject);
assert(this.foo === 'baz');
}
Copyright (c) 2015 Jayson Harshbarger
MIT License
FAQs
signals, in TypeScript, fast
The npm package mini-signals receives a total of 37,770 weekly downloads. As such, mini-signals popularity was classified as popular.
We found that mini-signals 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.