From d6ba2f948c679c3104ce6d6c897bedff0f1c5b74 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 5 Feb 2024 21:14:00 -0800 Subject: [PATCH] [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` --- index.js | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 19ad8db..c57aad7 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,10 @@ 'use strict'; var callBound = require('call-bind/callBound'); -var GetIntrinsic = require('get-intrinsic'); var isRegex = require('is-regex'); var $exec = callBound('RegExp.prototype.exec'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); module.exports = function regexTester(regex) { if (!isRegex(regex)) { diff --git a/package.json b/package.json index fed35b7..3a75115 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "homepage": "https://github.com/ljharb/safe-regex-test#readme", "dependencies": { "call-bind": "^1.0.6", - "get-intrinsic": "^1.2.3", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, "devDependencies": {