Skip to content

Commit

Permalink
[Refactor] use es-object-atoms and es-errors where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 18, 2024
1 parent 4fea25f commit 50cf805
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ var Get = require('es-abstract/2023/Get');
var HasProperty = require('es-abstract/2023/HasProperty');
var IsCallable = require('es-abstract/2023/IsCallable');
var LengthOfArrayLike = require('es-abstract/2023/LengthOfArrayLike');
var ToObject = require('es-abstract/2023/ToObject');
var ToObject = require('es-object-atoms/ToObject');
var ToString = require('es-abstract/2023/ToString');

var callBound = require('call-bind/callBound');
var isString = require('is-string');
var $Object = require('es-object-atoms');

// Check failure of by-index access of string characters (IE < 9) and failure of `0 in boxedString` (Rhino)
var boxedString = Object('a');
var boxedString = $Object('a');
var splitString = boxedString[0] !== 'a' || !(0 in boxedString);

var $split = callBound('String.prototype.split');
var $TypeError = TypeError;
var $TypeError = require('es-errors/type');

module.exports = function reduceRight(callbackfn) {
var O = ToObject(this);
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var define = require('define-properties');
var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');
var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
var callBind = require('call-bind');
var callBound = require('call-bind/callBound');

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"define-properties": "^1.2.0",
"es-abstract": "^1.22.1",
"es-array-method-boxes-properly": "^1.0.0",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0",
"is-string": "^1.0.7"
},
"devDependencies": {
Expand Down

0 comments on commit 50cf805

Please sign in to comment.