diff --git a/lib/6to5/traverse/index.js b/lib/6to5/traverse/index.js index a6fe9c1efe..04adfd5a50 100644 --- a/lib/6to5/traverse/index.js +++ b/lib/6to5/traverse/index.js @@ -82,6 +82,10 @@ traverse.isFunction = function (node) { return _.contains(traverse.FUNCTION_TYPES, node.type); }; +traverse.isPattern = function (node) { + return node.type === "ArrayPattern" || node.type === "ObjectPattern"; +}; + traverse.Delete = {}; traverse.hasType = function (tree, type, blacklistTypes) { diff --git a/lib/6to5/util.js b/lib/6to5/util.js index 3ab08d6900..9826858d1b 100644 --- a/lib/6to5/util.js +++ b/lib/6to5/util.js @@ -20,10 +20,6 @@ exports.ensureBlock = function (node) { node.body = b.blockStatement(block); }; -exports.isPattern = function (node) { - return node.type === "ArrayPattern" || node.type === "ObjectPattern"; -}; - exports.isAbsolute = function (loc) { if (!loc) return false; if (loc[0] === "/") return true; // unix