Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from ljharb:main #58

Merged
merged 10 commits into from
Jan 13, 2025
3 changes: 1 addition & 2 deletions 2015/CharacterRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $push = callBound('Array.prototype.push');

module.exports = function CharacterRange(A, B) {
if (A.length !== 1 || B.length !== 1) {
Expand All @@ -25,7 +24,7 @@ module.exports = function CharacterRange(A, B) {

var arr = [];
for (var k = i; k <= j; k += 1) {
$push(arr, $fromCharCode(k));
arr[arr.length] = $fromCharCode(k);
}
return arr;
};
3 changes: 1 addition & 2 deletions 2015/CreateListFromArrayLike.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var callBound = require('call-bound');

var $TypeError = require('es-errors/type');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var $push = callBound('Array.prototype.push');

var Get = require('./Get');
var IsArray = require('./IsArray');
Expand Down Expand Up @@ -38,7 +37,7 @@ module.exports = function CreateListFromArrayLike(obj) {
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
$push(list, next);
list[list.length] = next;
index += 1;
}
return list;
Expand Down
6 changes: 1 addition & 5 deletions 2015/ObjectDefineProperties.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

var callBound = require('call-bound');

var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var ToObject = require('./ToObject');
Expand All @@ -11,8 +9,6 @@ var forEach = require('../helpers/forEach');
var getOwnPropertyDescriptor = require('gopd');
var OwnPropertyKeys = require('own-keys');

var $push = callBound('Array.prototype.push');

// https://262.ecma-international.org/6.0/#sec-objectdefineproperties

/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
Expand All @@ -27,7 +23,7 @@ module.exports = function ObjectDefineProperties(O, Properties) {
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
$push(descriptors, [nextKey, desc]); // step 4.b.iii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});

Expand Down
3 changes: 1 addition & 2 deletions 2016/CharacterRange.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 2016/CreateListFromArrayLike.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions 2016/IterableToArrayLike.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
'use strict';

var callBound = require('call-bound');
var $arrayPush = callBound('Array.prototype.push');

var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var GetIterator = require('./GetIterator');
Expand All @@ -29,7 +26,7 @@ module.exports = function IterableToArrayLike(items) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
$arrayPush(values, nextValue);
values[values.length] = nextValue;
}
}
return values;
Expand Down
6 changes: 1 addition & 5 deletions 2016/ObjectDefineProperties.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 2017/CharacterRange.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 2017/CreateListFromArrayLike.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions 2017/IterableToList.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
'use strict';

var callBound = require('call-bound');
var $arrayPush = callBound('Array.prototype.push');

var GetIterator = require('./GetIterator');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
Expand All @@ -17,7 +14,7 @@ module.exports = function IterableToList(items, method) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
$arrayPush(values, nextValue);
values[values.length] = nextValue;
}
}
return values;
Expand Down
6 changes: 1 addition & 5 deletions 2017/ObjectDefineProperties.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 2017/WordCharacters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var $TypeError = require('es-errors/type');

var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf', true);
var $indexOf = callBound('String.prototype.indexOf');

var Canonicalize = require('./Canonicalize');

Expand Down
3 changes: 1 addition & 2 deletions 2018/CharacterRange.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 2018/CreateListFromArrayLike.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions 2018/IterableToList.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions 2018/ObjectDefineProperties.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 2018/WordCharacters.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 2019/CharacterRange.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 2019/CreateListFromArrayLike.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions 2019/IterableToList.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions 2019/ObjectDefineProperties.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 2019/WordCharacters.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading