Skip to content

Commit

Permalink
[Refactor] use es-errors, so things that only need those do not nee…
Browse files Browse the repository at this point in the history
…d `get-intrinsic`
  • Loading branch information
ljharb committed Feb 6, 2024
1 parent 5a3b1d7 commit d6ba2f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit d6ba2f9

Please sign in to comment.