
Security News
/Company News
Socket Is Sponsoring Composer and Packagist
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.
a tap plugin
$ npm install --save js-tap
var tap = require('js-tap');
//直接调用
tap('.test',function(){
console.log(this);
})
//事件委托
tap(document,'.test',function(){
console.log(this);
})
//阻止事件冒泡/默认动作
tap('.test',function(e){
e.stopPropagation();
e.preventDefault();
})
//同时指定多个事件
tap(document,{
'.el1':function(){
//事件1
},
'.el2':function(){
//事件2
},
'.el3':function(){
//事件3
}
})
- 增加同时指定多个事件方式
- 事件委托可以使用document
- 返回touchend或click事件,可手动进行阻止冒泡等其他操作
- 发布至github及npm(js-tap)
- 可以直接调用及通过事件委托调用
- 增加阻止事件冒泡功能
FAQs
a tap plugin
We found that js-tap 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
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.

Research
/Security News
Benign-looking npm packages split malicious functionality across a dependency chain that deploys a cross-platform RAT targeting Alibaba developers.

Research
/Security News
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.