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

toSpliced matches splice TypeError logic #70

Merged
merged 1 commit into from Jan 9, 2022

Conversation

acutmore
Copy link
Collaborator

@acutmore acutmore commented Jan 9, 2022

Fixes #54

toSpliced now throws a TypeError when the array length exceeds MAX_SAFE_INTEGER, matching the check in splice.

test262 PR merged: nicolo-ribaudo/test262#1

ljharb
ljharb approved these changes Jan 9, 2022
@acutmore acutmore merged commit c013c3f into tc39:main Jan 9, 2022
2 checks passed
@acutmore acutmore deleted the tospliced-type-error branch January 9, 2022 21:19
ljharb added a commit to es-shims/Array.prototype.toSpliced that referenced this pull request Mar 30, 2022
ljharb added a commit to es-shims/Array.prototype.toSpliced that referenced this pull request Mar 31, 2022
zloirock added a commit to zloirock/core-js that referenced this pull request Apr 2, 2022
petamoriken added a commit to petamoriken/float16 that referenced this pull request Dec 6, 2022
* Add `Float16Array#withReversed`

* Add `Float16Array#withSorted`

* Add `Float16Array#withSpliced`

* Add `Float16Array#withAt`

* use 'to' prefix for method names

tc39/proposal-change-array-by-copy#50

* `.toSpliced` should throw a `TypeError` instead of `RangeError`

tc39/proposal-change-array-by-copy#70

* `.with` should convert `value` up front

tc39/proposal-change-array-by-copy#86

* Fix: `Float16Array#{toSorted, toSpliced}.length`

* Avoid userland re-entrance after a read in `Float16Array#spliced`

tc39/proposal-change-array-by-copy#89

* Remove `Float16Array#toSpliced`

tc39/proposal-change-array-by-copy#88 (comment)

* Optimize `Float16Array#toSorted`

* Add types of Change Array by Copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

toSpliced differences from splice
2 participants