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 3, 2024
1 parent 5828e8e commit f11db9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Expand Up @@ -2,9 +2,11 @@

var undefined;

var $SyntaxError = SyntaxError;
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');

var $Function = Function;
var $TypeError = TypeError;

// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
Expand Down Expand Up @@ -101,7 +103,7 @@ var INTRINSICS = {
'%parseInt%': parseInt,
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
'%RangeError%': RangeError,
'%RangeError%': $RangeError,
'%ReferenceError%': ReferenceError,
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
'%RegExp%': RegExp,
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -73,6 +73,7 @@
"hideCredit": true
},
"dependencies": {
"es-errors": "^1.0.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
Expand Down

0 comments on commit f11db9c

Please sign in to comment.