Socket
Socket
Sign inDemoInstall

@domql/update

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domql/update - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

23

index.js

@@ -25,6 +25,4 @@ 'use strict'

const applyUpdateInit = (params, element) => {
console.log('start update', element.key)
on.initUpdate(element)
if (isString(params) || isNumber(params)) params = { text: params }
console.warn('params', params)
return params

@@ -65,16 +63,11 @@ }

const { ref } = element
const value = element[key]
const { children, childrenKeys } = ref
console.log('====')
console.log(key, childrenKeys, value)
// if (isString(params) || isNumber(params)) params = { text: params }
// move value to ref.children
if (childrenKeys.indexOf(key) === -1) {
const value = params[key]
childrenKeys.push(key)
element[key] = params[key]
console.log('-----')
console.log(params[key], element, key, options)
return children.push(create(params[key], element, key, options))
element[key] = value
const newElement = create(value, element, key, options)
return children.push(newElement)
}

@@ -108,4 +101,5 @@

if (children && children.length) {
ref.children = children.map(child => {
return update(element[child.key] || {}, child, options)
children.map(child => {
update(element[child.key] || {}, child, options)
return child
})

@@ -118,4 +112,5 @@ }

const triggerOnUpdate = (params, element, options) => {
const { ref } = element
on.update(params, element, element.state)
return element
return ref.__updates[0]
}

@@ -122,0 +117,0 @@

{
"name": "@domql/update",
"version": "2.2.0",
"version": "2.2.1",
"main": "index.js",

@@ -16,4 +16,4 @@ "license": "MIT",

},
"gitHead": "ec7e77cec088dafc6b4a5d2893f72e3590a6761e",
"gitHead": "87a27f601df3c39a91dd199fb2068bb761f6ed4e",
"source": "src/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