We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Object.prototype
Add this to the tests:
Object.prototype[1] = 42; // try to break `arguments[1]` Object.prototype[2] = 'lol'; // try to break `arguments[2]`
Functions and methods that might have this issue:
Array
from
fill
find
findIndex
String
startsWith
endsWith
contains
The text was updated successfully, but these errors were encountered:
Is it a real concern or hasOwnProperty usage is in the spec?
hasOwnProperty
Sorry, something went wrong.
The spec for e.g. String#startsWith says:
String#startsWith
Step 7. Let pos be ToInteger(position). (If position is undefined, this step produces the value 0).
pos
ToInteger(position)
position
undefined
0
Luckily, there’s no need to use hasOwnProperty to detect if a secondary argument was passed or not.
I had the same problem with my polyfill. Here’s the fix: mathiasbynens/String.prototype.startsWith@978e0c2
ljharb
Successfully merging a pull request may close this issue.
Add this to the tests:
Functions and methods that might have this issue:
Array
:from
,fill
,find
,findIndex
String
:startsWith
,endsWith
,contains
The text was updated successfully, but these errors were encountered: