diff options
Diffstat (limited to 'node_modules/@babel/helper-plugin-utils/lib/index.js')
| -rw-r--r-- | node_modules/@babel/helper-plugin-utils/lib/index.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/node_modules/@babel/helper-plugin-utils/lib/index.js b/node_modules/@babel/helper-plugin-utils/lib/index.js index bad40f8a..b8b73662 100644 --- a/node_modules/@babel/helper-plugin-utils/lib/index.js +++ b/node_modules/@babel/helper-plugin-utils/lib/index.js @@ -33,21 +33,17 @@ function declare(builder) { return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname); }; } -const declarePreset = declare; -exports.declarePreset = declarePreset; +const declarePreset = exports.declarePreset = declare; function copyApiObject(api) { let proto = null; if (typeof api.version === "string" && /^7\./.test(api.version)) { proto = Object.getPrototypeOf(api); - if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) { + if (proto && (!hasOwnProperty.call(proto, "version") || !hasOwnProperty.call(proto, "transform") || !hasOwnProperty.call(proto, "template") || !hasOwnProperty.call(proto, "types"))) { proto = null; } } return Object.assign({}, proto, api); } -function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} function throwVersionError(range, version) { if (typeof range === "number") { if (!Number.isInteger(range)) { |
