From 83d975c4581b35816e303c6c5de4221147b43543 Mon Sep 17 00:00:00 2001 From: 59naga Date: Wed, 27 Apr 2016 00:48:48 +0900 Subject: [PATCH] Remove unnecessary `lodash.get` --- package.json | 3 +-- src/index.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d9776b8..9ad0750 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,7 @@ } }, "dependencies": { - "babel-template": "^6.5.0", - "lodash.get": "^4.2.1" + "babel-template": "^6.5.0" }, "devDependencies": { "abigail": "^1.6.1", diff --git a/src/index.js b/src/index.js index b0af754..abfcc86 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,4 @@ import babelTemplate from 'babel-template' -import _get from 'lodash.get' export default { visitor: { @@ -18,7 +17,7 @@ export default { } if (path.isExportNamedDeclaration()) { // HACK detect export-from statements for default - const specifiers = _get(path.get('declaration'), 'container.specifiers') + const specifiers = path.get('declaration').container.specifiers const isDefaultExportDeclaration = specifiers.length === 1 && specifiers[0].exported.name === 'default' if (isDefaultExportDeclaration) { hasExportDefault = true