estraverse-fb
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -9,3 +9,3 @@ var estraverse = module.exports = require('estraverse'); | ||
var keys = VisitorKeys[nodeType]; | ||
if (keys) { | ||
@@ -12,0 +12,0 @@ estraverse.VisitorKeys[nodeType] = keys; |
36
keys.js
@@ -1,15 +0,16 @@ | ||
module.exports = { | ||
XJSIdentifier: [], | ||
XJSNamespacedName: ['namespace', 'name'], | ||
XJSMemberExpression: ['object', 'property'], | ||
XJSEmptyExpression: [], | ||
XJSExpressionContainer: ['expression'], | ||
XJSElement: ['openingElement', 'closingElement', 'children'], | ||
XJSClosingElement: ['name'], | ||
XJSOpeningElement: ['name', 'attributes'], | ||
XJSAttribute: ['name', 'value'], | ||
XJSText: null, | ||
XJSSpreadAttribute: ['argument'], | ||
var unprefixedKeys = { | ||
Identifier: [], | ||
NamespacedName: ['namespace', 'name'], | ||
MemberExpression: ['object', 'property'], | ||
EmptyExpression: [], | ||
ExpressionContainer: ['expression'], | ||
Element: ['openingElement', 'closingElement', 'children'], | ||
ClosingElement: ['name'], | ||
OpeningElement: ['name', 'attributes'], | ||
Attribute: ['name', 'value'], | ||
Text: null, | ||
SpreadAttribute: ['argument'] | ||
}; | ||
/* Flow Type Annotations */ | ||
var flowKeys = { | ||
Type: [], | ||
@@ -48,3 +49,10 @@ AnyTypeAnnotation: [], | ||
DeclareModule: ["id", "body"] | ||
/* End: Flow Type Annotations */ | ||
}; | ||
for (var key in unprefixedKeys) { | ||
exports['XJS' + key] = exports['JSX' + key] = unprefixedKeys[key]; | ||
} | ||
for (var key in flowKeys) { | ||
exports[key] = flowKeys[key]; | ||
} |
{ | ||
"name": "estraverse-fb", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Drop-in for estraverse that enables traversal over React's JSX nodes.", | ||
@@ -5,0 +5,0 @@ "main": "estraverse-fb.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
7834
162