
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
component-tap-event
Advanced tools
Make your touchstart event listeners into a tap event listener!
What is "correct" behavior? The tap event:
click event.Preserve context and arguments in 1.1.0, works with delegate easily
npm install component-tap-event -S
var tap = require('tap-event')
var el = document.querySelector('#container')
// the event you want to handle
function changeLocation(e) {
// e.preventDefault() is already called!
location.href = this.href
}
// wrap the listener
var listener = tap(changeLocation)
// listen to `touchstart`
el.addEventListener('touchstart', listener)
// remove the listener
el.removeEventListener('touchstart', listener)
or, more succinctly:
document.querySelector('#container').addEventListener('touchstart', tap(function (e) {
location.href = this.href
}))
To set a custom timeout (default is 200ms), you have two options:
// set globally
tap.timeout = 300
// set per instance
tap(function (e) {
}, {
timeout: 300
})
FAQs
Create tap event listeners
The npm package component-tap-event receives a total of 196 weekly downloads. As such, component-tap-event popularity was classified as not popular.
We found that component-tap-event 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.