From 7bb53314a86c56af4931931fa75234d9a5800df5 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 13 Oct 2014 20:12:28 +1100 Subject: [PATCH] move util.isPattern to traverse.isPattern --- lib/6to5/traverse/index.js | 4 ++++ lib/6to5/util.js | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) 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