babel-helper-vue-jsx-merge-props
Advanced tools
Comparing version 2.0.1 to 2.0.2
15
index.js
@@ -5,3 +5,3 @@ var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/ | ||
return objs.reduce(function (a, b) { | ||
var aa, bb, key, nestedKey | ||
var aa, bb, key, nestedKey, temp | ||
for (key in b) { | ||
@@ -11,2 +11,15 @@ aa = a[key] | ||
if (aa && nestRE.test(key)) { | ||
// normalize class | ||
if (key === 'class') { | ||
if (typeof aa === 'string') { | ||
temp = aa | ||
a[key] = aa = {} | ||
aa[temp] = true | ||
} | ||
if (typeof bb === 'string') { | ||
temp = bb | ||
b[key] = bb = {} | ||
bb[temp] = true | ||
} | ||
} | ||
if (key === 'on' || key === 'nativeOn' || key === 'hook') { | ||
@@ -13,0 +26,0 @@ // merge functions |
{ | ||
"name": "babel-helper-vue-jsx-merge-props", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "babel helper for vue jsx spread.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
1815
48