
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
click-and-hold
Advanced tools
[](https://travis-ci.com/Duder-onomy/click-and-hold)
Will fire a handler throttled by an interval, continuously while user presses on element.
Supports touch.
Zero dependencies.
Important to note: If your handler relies on scope, ensure it is called with the correct scope by binding the scope directly, or using the closure.
import clickAndHold from 'click-and-hold';
clickAndHold.register(element, handler.bind(theScopeYouWant), interval);
clickAndHold.unregister(element);
When the element is first interacted with (mousedown, touchstart), we start a loop that will continuously try and call a passed handler on a passed interval. To avoid complexity, we store the interval and subsequent handlers on the element itself. Its only 50 something lines. Scope it.
npm install --save-dev click-and-hold
From 1.X.X -> 2.X.X, We are now using es6 module imports instead of common.js. Thinks like webpack/browserify/etc should be able to hang either way.
I am not trying to camp names on NPM, so if someone else wants this name just let me know and I will gladly take my repo down.
FAQs
[](https://travis-ci.com/Duder-onomy/click-and-hold)
The npm package click-and-hold receives a total of 159 weekly downloads. As such, click-and-hold popularity was classified as not popular.
We found that click-and-hold 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.