🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

clap.js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clap.js

Unified tap/click event API

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

clap.js

Unified tap/click event API. Because touchstart can be misinterpreted in swipe scenarios. Do not let it happen with clap.js.

usage

var onClap = require('clap.js')

onClap(domElement, function(e) {
  console.log('click or tap here')
})

// onClick() returns dispose handler:
var dispose = onClick(otherElement, function(e) { /* ... */ })
// So that if you don't need it anymore, you can dispose it:
dispose()

install

Grab it from npm to use with your favorite bundler:

npm install clap.js --save

Or use CDN:

https://cdn.rawgit.com/anvaka/clap.js/v1.0.0/dist/onclap.min.js

license

MIT

Keywords

click

FAQs

Package last updated on 10 Apr 2016

Did you know?

Socket

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.

Install

Related posts