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

snabbdom

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snabbdom - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

test/browserified.js

2

package.json
{
"name": "snabbdom",
"version": "0.1.3",
"version": "0.1.4",
"description": "A virtual DOM library with focus on simplicity, modularity, powerful features and performance.",

@@ -5,0 +5,0 @@ "main": "snabbdom.js",

@@ -185,3 +185,3 @@ // jshint newcap: false

i = vnode.data.hook;
if (!isUndef(i) && !isUndef(i = i.update)) i(vnode);
if (!isUndef(i) && !isUndef(i = i.update)) i(oldVnode, vnode);
}

@@ -188,0 +188,0 @@ if (isUndef(vnode.text)) {

@@ -529,4 +529,10 @@ var assert = require('assert');

it('calls `update` listener', function() {
var result = [];
function cb(vnode, rm) {
var result1 = [];
var result2 = [];
function cb(result, oldVnode, vnode) {
if (result.length > 0) {
console.log(result[result.length-1]);
console.log(oldVnode);
assert.strictEqual(result[result.length-1], oldVnode);
}
result.push(vnode);

@@ -536,5 +542,5 @@ }

h('span', 'First sibling'),
h('div', {hook: {update: cb}}, [
h('div', {hook: {update: cb.bind(null, result1)}}, [
h('span', 'Child 1'),
h('span', {hook: {update: cb}}, 'Child 2'),
h('span', {hook: {update: cb.bind(null, result2)}}, 'Child 2'),
]),

@@ -544,5 +550,5 @@ ]);

h('span', 'First sibling'),
h('div', {hook: {update: cb}}, [
h('div', {hook: {update: cb.bind(null, result1)}}, [
h('span', 'Child 1'),
h('span', {hook: {update: cb}}, 'Child 2'),
h('span', {hook: {update: cb.bind(null, result2)}}, 'Child 2'),
]),

@@ -552,3 +558,4 @@ ]);

patch(vnode1, vnode2);
assert.equal(result.length, 2);
assert.equal(result1.length, 1);
assert.equal(result2.length, 1);
});

@@ -555,0 +562,0 @@ it('calls `remove` listener', function() {

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