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

vdom

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vdom - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

package.json
{
"name": "vdom",
"version": "0.0.5",
"version": "0.0.6",
"description": "A DOM create and patch algorithm for vtree",

@@ -23,3 +23,3 @@ "keywords": [],

"x-is-array": "0.1.0",
"vtree": "0.0.4"
"vtree": "0.0.5"
},

@@ -26,0 +26,0 @@ "devDependencies": {

@@ -121,2 +121,3 @@ var applyProperties = require("./apply-properties")

var i
var reverseIndex = bIndex.reverse

@@ -127,10 +128,31 @@ for (i = 0; i < len; i++) {

var insertOffset = 0
var move
var node
var insertNode
for (i = 0; i < len; i++) {
var move = bIndex[i]
if (move !== undefined) {
var node = children[move]
domNode.removeChild(node)
domNode.insertBefore(node, childNodes[i])
move = bIndex[i]
if (move !== undefined && move !== i) {
// the element currently at this index will be moved later so increase the insert offset
if (reverseIndex[i] > i) {
insertOffset++
}
node = children[move]
insertNode = childNodes[i + insertOffset]
if (node !== insertNode) {
domNode.insertBefore(node, insertNode)
}
// the moved element came from the front of the array so reduce the insert offset
if (move < i) {
insertOffset--
}
}
// element at this index is scheduled to be removed so increase insert offset
if (i in bIndex.removes) {
insertOffset++
}
}
}
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