Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Decouple the DOM events from expensive functions.
$ npm install decouple
$ bower install decouple
$ spm install decouple
$ component install pazguille/decouple
function foo(event) {
console.log('foo');
// The function receive the scroll event as parameter.
console.log(event);
// The function context is the given node.
console.log(this.scrollTop);
}
function bar() {
console.log('bar');
}
decouple(document.querySelector('#box'), 'scroll', foo);
Decouple the DOM event
from the listener
on give node
. Returns the listener handler.
node
{HTMLElement} - A given HTMLElement
.event
{String} - A given DOM event
.listener
{Function} - A given listener
to execute when the given event
is fired.decouple(window, 'scroll', fn);
MIT license. Copyright © 2016.
FAQs
Decouple the DOM events from expensive functions.
We found that decouple 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.