Socket
Socket
Sign inDemoInstall

@domql/event

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domql/event - npm Package Compare versions

Comparing version 2.0.8 to 2.2.0

50

on.js
'use strict'
import { isFunction } from '@domql/utils'
export const init = (param, element, state) => {

@@ -11,24 +13,48 @@ param(element, state)

export const initUpdate = (param, element, state) => {
param(element, state)
export const initUpdate = (element) => {
console.log(element)
const { ref, state, on } = element
const { props } = ref
if (on && isFunction(on.initUpdate)) {
on.initUpdate(props, state, ref)
}
}
export const attachNode = (param, element, state) => {
param(element, state)
// export const attachNode = (param, element, state) => {
// param(element, state)
// }
export const createState = (state, element) => {
const { on, ...el } = element
if (on && isFunction(on.createState)) {
on.createState(state, el)
}
}
export const stateCreated = (param, element, state) => {
param(element, state)
export const updateStateInit = (changes, element) => {
const { state, on, ...el } = element
if (on && isFunction(on.updateStateInit)) {
on.updateStateInit(changes, state, el)
}
}
export const initStateUpdated = (param, element, state) => {
param(element, state)
export const updateState = (changes, element) => {
const { state, on } = element
if (on && isFunction(on.updateState)) {
on.updateState(changes, state, element)
}
}
export const stateUpdated = (param, element, state) => {
param(element, state)
export const propsUpdated = (element) => {
const { props, state, on } = element
if (on && isFunction(on.propsUpdated)) {
on.propsUpdated(props, state, element)
}
}
export const update = (param, element, state) => {
param(element, state)
export const update = (params, element, state) => {
if (element.on && isFunction(element.on.update)) {
element.on.update(element, state)
}
return params
}
{
"name": "@domql/event",
"version": "2.0.8",
"version": "2.2.0",
"main": "index.js",

@@ -9,4 +9,7 @@ "license": "MIT",

},
"gitHead": "b60c46e45c462d00976902d6cdbea6fd5504542b",
"dependencies": {
"@domql/utils": "latest"
},
"gitHead": "ec7e77cec088dafc6b4a5d2893f72e3590a6761e",
"source": "index.js"
}
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