babel-plugin-jsx-event-modifiers
Advanced tools
Comparing version 2.0.3 to 2.0.5
@@ -2173,3 +2173,3 @@ 'use strict'; | ||
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/index.js', | ||
hash = 'ceef7ed7c96d21dd766752eae5ea178015fc6979', | ||
hash = '014199d1d98abed5c3c5abff53ae757229b98206', | ||
global = new Function('return this')(), | ||
@@ -2186,3 +2186,3 @@ gcv = '__coverage__', | ||
end: { | ||
line: 27, | ||
line: 28, | ||
column: 1 | ||
@@ -2197,3 +2197,3 @@ } | ||
end: { | ||
line: 24, | ||
line: 25, | ||
column: 8 | ||
@@ -2215,3 +2215,3 @@ } | ||
line: 12, | ||
column: 25 | ||
column: 41 | ||
}, | ||
@@ -2226,16 +2226,36 @@ end: { | ||
line: 13, | ||
column: 25 | ||
}, | ||
end: { | ||
line: 13, | ||
column: 107 | ||
} | ||
}, | ||
'5': { | ||
start: { | ||
line: 13, | ||
column: 72 | ||
}, | ||
end: { | ||
line: 13, | ||
column: 106 | ||
} | ||
}, | ||
'6': { | ||
start: { | ||
line: 14, | ||
column: 10 | ||
}, | ||
end: { | ||
line: 22, | ||
line: 23, | ||
column: 11 | ||
} | ||
}, | ||
'5': { | ||
'7': { | ||
start: { | ||
line: 14, | ||
line: 15, | ||
column: 12 | ||
}, | ||
end: { | ||
line: 21, | ||
line: 22, | ||
column: 13 | ||
@@ -2264,3 +2284,3 @@ } | ||
end: { | ||
line: 27, | ||
line: 28, | ||
column: 1 | ||
@@ -2270,2 +2290,26 @@ } | ||
line: 5 | ||
}, | ||
'1': { | ||
name: '(anonymous_1)', | ||
decl: { | ||
start: { | ||
line: 13, | ||
column: 65 | ||
}, | ||
end: { | ||
line: 13, | ||
column: 66 | ||
} | ||
}, | ||
loc: { | ||
start: { | ||
line: 13, | ||
column: 72 | ||
}, | ||
end: { | ||
line: 13, | ||
column: 106 | ||
} | ||
}, | ||
line: 13 | ||
} | ||
@@ -2277,7 +2321,7 @@ }, | ||
start: { | ||
line: 13, | ||
line: 14, | ||
column: 10 | ||
}, | ||
end: { | ||
line: 22, | ||
line: 23, | ||
column: 11 | ||
@@ -2289,7 +2333,7 @@ } | ||
start: { | ||
line: 13, | ||
line: 14, | ||
column: 10 | ||
}, | ||
end: { | ||
line: 22, | ||
line: 23, | ||
column: 11 | ||
@@ -2299,11 +2343,11 @@ } | ||
start: { | ||
line: 13, | ||
line: 14, | ||
column: 10 | ||
}, | ||
end: { | ||
line: 22, | ||
line: 23, | ||
column: 11 | ||
} | ||
}], | ||
line: 13 | ||
line: 14 | ||
} | ||
@@ -2317,6 +2361,9 @@ }, | ||
'4': 0, | ||
'5': 0 | ||
'5': 0, | ||
'6': 0, | ||
'7': 0 | ||
}, | ||
f: { | ||
'0': 0 | ||
'0': 0, | ||
'1': 0 | ||
}, | ||
@@ -2351,7 +2398,12 @@ b: { | ||
var attributes = (cov_131o2j1ear.s[2]++, path.get('attributes')); | ||
var events = (cov_131o2j1ear.s[3]++, Object.entries(attributes.reduce(groupEventAttributes(t), {}))); | ||
cov_131o2j1ear.s[4]++; | ||
var groupedEventAttributes = (cov_131o2j1ear.s[3]++, attributes.reduce(groupEventAttributes(t), {})); | ||
var events = (cov_131o2j1ear.s[4]++, Object.keys(groupedEventAttributes).map(function (key) { | ||
cov_131o2j1ear.f[1]++; | ||
cov_131o2j1ear.s[5]++; | ||
return [key, groupedEventAttributes[key]]; | ||
})); | ||
cov_131o2j1ear.s[6]++; | ||
if (events.length > 0) { | ||
cov_131o2j1ear.b[0][0]++; | ||
cov_131o2j1ear.s[5]++; | ||
cov_131o2j1ear.s[7]++; | ||
@@ -2358,0 +2410,0 @@ path.pushContainer('attributes', t.jSXSpreadAttribute(t.objectExpression([t.objectProperty(t.identifier('on'), t.objectExpression(events.map(generateSpreadEvent(t))))]))); |
@@ -148,3 +148,6 @@ 'use strict'; | ||
var attributes = path.get('attributes'); | ||
var events = Object.entries(attributes.reduce(groupEventAttributes(t), {})); | ||
var groupedEventAttributes = attributes.reduce(groupEventAttributes(t), {}); | ||
var events = Object.keys(groupedEventAttributes).map(function (key) { | ||
return [key, groupedEventAttributes[key]]; | ||
}); | ||
if (events.length > 0) { | ||
@@ -151,0 +154,0 @@ path.pushContainer('attributes', t.jSXSpreadAttribute(t.objectExpression([t.objectProperty(t.identifier('on'), t.objectExpression(events.map(generateSpreadEvent(t))))]))); |
{ | ||
"name": "babel-plugin-jsx-event-modifiers", | ||
"version": "2.0.3", | ||
"version": "2.0.5", | ||
"description": "JSX Syntactic Sugar Plugin for Event Modifiers", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.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
59999
2483