codestop-js-proof
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -52,2 +52,15 @@ "use strict"; | ||
} | ||
else if (_.has(node, 'object') && _.has(node['object'], subNode) && (node['object'][subNode] instanceof Array || node['object'][subNode] instanceof Object)) { | ||
if (subNode == 'arguments') { | ||
nodes = [...nodes, ...node['object'][subNode]]; | ||
} | ||
else { | ||
nodes.push(node['object'][subNode]); | ||
} | ||
} | ||
else if (_.has(node, 'type') && node['type'] == 'MemberExpression' && _.has(node, 'property') && (node['property'] instanceof Array || node['property'] instanceof Object)) { | ||
if (subNode == 'identifier' && node['property']['type'] == 'Identifier') { | ||
nodes.push(node['property']); | ||
} | ||
} | ||
} | ||
@@ -54,0 +67,0 @@ return new Nodes(nodes); |
{ | ||
"name": "codestop-js-proof", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "## Usage", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -55,2 +55,12 @@ import * as _ from 'lodash'; | ||
} | ||
} else if (_.has(node, 'object') && _.has(node['object'], subNode) && (node['object'][subNode] instanceof Array || node['object'][subNode] instanceof Object)) { | ||
if (subNode == 'arguments') { | ||
nodes = [...nodes, ...node['object'][subNode]]; | ||
} else { | ||
nodes.push(node['object'][subNode]); | ||
} | ||
} else if (_.has(node, 'type') && node['type'] == 'MemberExpression' && _.has(node, 'property') && (node['property'] instanceof Array || node['property'] instanceof Object)) { | ||
if (subNode == 'identifier' && node['property']['type'] == 'Identifier') { | ||
nodes.push(node['property']); | ||
} | ||
} | ||
@@ -57,0 +67,0 @@ } |
129336
3873