babel-plugin-jsx-dom-expressions
Advanced tools
Comparing version 0.0.28 to 0.0.29
@@ -439,3 +439,3 @@ var NOINSERT, NOMATCH, RECONCILE_ARRAY_BATCH, RECONCILE_ARRAY_BITS, RECONCILE_ARRAY_INC, RECONCILE_ARRAY_MASK, equable, findGreatestIndexLEQ, insertOrAppend, longestPositiveIncreasingSubsequence, reconcileArrays; | ||
singleExpression = function(parent, value, current) { | ||
var array, child, j, l, len1, len2, t; | ||
var array, child, j, k, len1, len2, t; | ||
if (value === current) { | ||
@@ -493,4 +493,4 @@ return current; | ||
} else if (!current) { | ||
for (l = 0, len2 = array.length; l < len2; l++) { | ||
child = array[l]; | ||
for (k = 0, len2 = array.length; k < len2; k++) { | ||
child = array[k]; | ||
parent.appendChild(child); | ||
@@ -584,12 +584,2 @@ } | ||
return Object.assign({ | ||
assign: function(a) { | ||
var b, i, j, k, ref; | ||
for (i = j = 1, ref = arguments.length; j < ref; i = j += 1) { | ||
b = arguments[i]; | ||
for (k in b) { | ||
a[k] = b[k]; | ||
} | ||
} | ||
return a; | ||
}, | ||
insert: function(parent, accessor) { | ||
@@ -613,3 +603,3 @@ if (typeof accessor !== 'function') { | ||
return wrap(function() { | ||
var className, info, k, prop, props, value; | ||
var className, info, prop, props, value; | ||
props = accessor(); | ||
@@ -619,5 +609,3 @@ for (prop in props) { | ||
if (prop === 'style') { | ||
for (k in value) { | ||
node.style[k] = value[k]; | ||
} | ||
Object.assign(node.style, value); | ||
continue; | ||
@@ -624,0 +612,0 @@ } |
@@ -447,3 +447,3 @@ 'use strict'; | ||
singleExpression = function(parent, value, current) { | ||
var array, child, j, l, len1, len2, t; | ||
var array, child, j, k, len1, len2, t; | ||
if (value === current) { | ||
@@ -501,4 +501,4 @@ return current; | ||
} else if (!current) { | ||
for (l = 0, len2 = array.length; l < len2; l++) { | ||
child = array[l]; | ||
for (k = 0, len2 = array.length; k < len2; k++) { | ||
child = array[k]; | ||
parent.appendChild(child); | ||
@@ -592,12 +592,2 @@ } | ||
return Object.assign({ | ||
assign: function(a) { | ||
var b, i, j, k, ref; | ||
for (i = j = 1, ref = arguments.length; j < ref; i = j += 1) { | ||
b = arguments[i]; | ||
for (k in b) { | ||
a[k] = b[k]; | ||
} | ||
} | ||
return a; | ||
}, | ||
insert: function(parent, accessor) { | ||
@@ -621,3 +611,3 @@ if (typeof accessor !== 'function') { | ||
return wrap(function() { | ||
var className, info, k, prop, props, value; | ||
var className, info, prop, props, value; | ||
props = accessor(); | ||
@@ -627,5 +617,3 @@ for (prop in props) { | ||
if (prop === 'style') { | ||
for (k in value) { | ||
node.style[k] = value[k]; | ||
} | ||
Object.assign(node.style, value); | ||
continue; | ||
@@ -732,3 +720,3 @@ } | ||
case 'style': | ||
return [t.arrowFunctionExpression([], t.callExpression(t.identifier(`${moduleName}.assign`), [t.memberExpression(elem, t.identifier(name)), value]))]; | ||
return [t.arrowFunctionExpression([], t.callExpression(t.identifier("Object.assign"), [t.memberExpression(elem, t.identifier(name)), value]))]; | ||
case 'classList': | ||
@@ -793,3 +781,3 @@ iter = t.identifier("className"); | ||
if (props.length > 1) { | ||
props = [t.callExpression(t.identifier(`${moduleName}.assign`), props)]; | ||
props = [t.callExpression(t.identifier("Object.assign"), props)]; | ||
} | ||
@@ -796,0 +784,0 @@ elems = [t.callExpression(t.identifier(tagName), props)]; |
{ | ||
"name": "babel-plugin-jsx-dom-expressions", | ||
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"author": "Ryan Carniato", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53324
1504