From 965a357a8f6ab24b81da5a7e949b643c788daf15 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 19 Mar 2024 22:58:07 -0700 Subject: [PATCH] [Refactor] use `gopd` --- package.json | 1 + shim.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c7604c..f02f583 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "es-abstract": "^1.22.1", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", "has-symbols": "^1.0.3", "internal-slot": "^1.0.5", "regexp.prototype.flags": "^1.5.0", diff --git a/shim.js b/shim.js index 2dd4a24..0e4395d 100644 --- a/shim.js +++ b/shim.js @@ -2,11 +2,12 @@ var define = require('define-properties'); var hasSymbols = require('has-symbols')(); +var gOPD = require('gopd'); + var getPolyfill = require('./polyfill'); var regexpMatchAllPolyfill = require('./polyfill-regexp-matchall'); var defineP = Object.defineProperty; -var gOPD = Object.getOwnPropertyDescriptor; module.exports = function shimMatchAll() { var polyfill = getPolyfill();