remove dead t.isFalsyExpression and ignore private properties in t.cloneDeep - fixes #962

This commit is contained in:
Sebastian McKenzie 2015-03-08 02:45:14 +11:00
parent c7bb00d58d
commit 70cd650e10

View File

@ -144,22 +144,6 @@ t.toComputedKey = function (node, key) {
return key; return key;
}; };
/*
* Shallowly checks to see if the passed `node` is falsy.
*
* @param {Object} node
* @returns {Boolean}
*/
t.isFalsyExpression = function (node) {
if (t.isLiteral(node)) {
return !node.value;
} else if (t.isIdentifier(node)) {
return node.name === "undefined";
}
return false;
};
/** /**
* Turn an array of statement `nodes` into a `SequenceExpression`. * Turn an array of statement `nodes` into a `SequenceExpression`.
* *
@ -453,6 +437,8 @@ t.cloneDeep = function (node) {
var newNode = {}; var newNode = {};
for (var key in node) { for (var key in node) {
if (key[0] === "_") continue;
var val = node[key]; var val = node[key];
if (val) { if (val) {