@putout/operate
Advanced tools
Comparing version 12.7.0 to 12.7.1
'use strict'; | ||
const {isArray} = Array; | ||
module.exports.getPathAfterRequires = (path) => { | ||
if (isArray(path)) | ||
return getNotRequire(path); | ||
if (!path.isProgram()) | ||
path = path.scope.getProgramParent().path; | ||
return getNotRequire(path.get('body')); | ||
}; | ||
function getNotRequire(body) { | ||
module.exports.getPathAfterRequires = (body) => { | ||
let path; | ||
@@ -24,3 +12,3 @@ | ||
return path; | ||
} | ||
}; | ||
@@ -27,0 +15,0 @@ function isRequire(path) { |
{ | ||
"name": "@putout/operate", | ||
"version": "12.7.0", | ||
"version": "12.7.1", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
24705
517