Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
mini-runner
Advanced tools
A simple alternative to events and signals with an emphasis on performance.
A simple alternative to events and signals with an emphasis on performance.
Can be used as an alternative to events / signals.
var onComplete = new MiniRunner('onComplete');
//listenerObject needs to have a 'onComplete' function
onComplete.add(listenerObject);
//emit and all listeners will have their 'onComplete' functions called
onComplete.emit(data);
Can be used to execute a funcition on many objects. Handy for games. If you need to update you game elements each frame:
var updateRunner = new MiniRunner('update');
// gameItems should all have a 'update' function
updateRunner.add(gameItem1);
updateRunner.add(gameItem2);
updateRunner.add(gameItem3);
// update game elements..
updateRunner.emit();
Pros:
Cons:
In practive I have found the Runner increadibly useful and so thought it would be nice to share with the world. It currently forms the backbone of the messaging system in our game engine. Its working out great for things like update events collison events etc.
Great to use if you are say looping through and array and calling the same function on each object. The resulting code is cleaner than a loop whilst still keeping the performance as fast as possible.
So yeah, if you are dispatching signals/events to a lot of listeners often (like everyframe often), then I would considor using this alternative. For most cases, this performace boost is not really important enough to switch from your current fave.
Think of this as a nice alternative for when speed really counts!
FAQs
A simple alternative to events and signals with an emphasis on performance.
The npm package mini-runner receives a total of 43 weekly downloads. As such, mini-runner popularity was classified as not popular.
We found that mini-runner 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.