Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boostact

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boostact - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

favicon/boostact.ico

16

package.json
{
"name": "boostact",
"version": "1.3.3",
"version": "1.3.4",
"main": "index.js",

@@ -24,2 +24,3 @@ "scripts": {

"eslint-plugin-prettier": "^3.1.4",
"favicons-webpack-plugin": "^4.2.0",
"html-webpack-plugin": "^4.5.0",

@@ -31,6 +32,3 @@ "mini-css-extract-plugin": "^1.0.0",

"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"highlight.js": "^10.4.1",
"jss": "^10.5.0",
"jss-preset-default": "^10.5.0"
"webpack-dev-server": "^3.11.0"
},

@@ -46,2 +44,10 @@ "keywords": [

"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"color": "^3.1.3",
"file-loader": "^6.2.0",
"highlight.js": "^10.4.1",
"jss": "^10.5.0",
"jss-preset-default": "^10.5.0",
"preact": "^10.5.7",
"styled-components": "^5.2.1",
"vanilla-router": "^1.2.8"

@@ -48,0 +54,0 @@ },

@@ -408,3 +408,3 @@ // aws key

}
HOOKS[CURRENT_HOOK_ID].work = fn;
HOOKS[CURRENT_HOOK_ID].cleanUp = HOOKS[CURRENT_HOOK_ID].work();

@@ -411,0 +411,0 @@ if (HOOKS[CURRENT_HOOK_ID].cleanUp && typeof HOOKS[CURRENT_HOOK_ID].cleanUp !== "function") {

class EventModule {
constructor() {
this.eventNode = [];
}
add(vNode) {
if (!vNode.dom) return;
if (this.eventNode.some((node) => node.dom.isEqualNode(vNode.dom))) return;
this.eventNode.push(vNode);
}
clear() {
this.eventNode.length = 0;
}
eventCall(event) {
const handlers = [];
event.path.forEach((element, index) => {
if (index > event.path.length - 2) return;
const targetNode = this.eventNode.find((node) => node.dom.isEqualNode(element));
const eventType = `on${this.capitalize(event.type)}`;
const handler = targetNode && targetNode.props && targetNode.props[eventType];
if (typeof handler === "function") handlers.push(handler);
});
handlers.forEach((handler) => handler(event));
}
capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
constructor(){
this.eventNode = [];
}
add(vNode){
if(!vNode.dom) return;
if(this.eventNode.some((node) => node.dom.isEqualNode(vNode.dom))) return;
this.eventNode.push(vNode);
}
clear(){
this.eventNode.length = 0;
}
eventCall(event){
const handlers = [];
event.path.forEach((element,index) => {
if(index > event.path.length - 2) return;
const targetNode = this.eventNode.find((node) => node.dom.isEqualNode(element));
const eventType = `on${this.capitalize(event.type)}`
const handler = targetNode && targetNode.props && targetNode.props[eventType];
if(typeof handler === "function")
handlers.push(handler);
})
handlers.forEach((handler) => handler(event));
}
capitalize(str){
return str.charAt(0).toUpperCase() + str.slice(1);
}
}
export default new EventModule();
export default new EventModule;

@@ -63,2 +63,2 @@ import Router from "vanilla-router";

export default { Link, Route };
export { Link, Route };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc