Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Array.prototype.at polyfill works inconsistent with spec. #1318

@stonechoe

Description

@stonechoe

The following code works different in node 15 and 16:

 const at = require('core-js-pure/actual/array/at');
at({ length: BigInt("-10") }, 0)
Running node v16.20.2 (npm v8.19.4)
TypeError: Cannot convert a BigInt value to a number
Running node v15.14.0 (npm v7.7.6)
undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions