Skip to content

Commit

Permalink
Firefox 18+ supports String#startsWith, String#endsWith
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Homyakov committed Jan 24, 2013
1 parent 4ce0b0f commit fa1f899
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/prototype/lang/string.js
Expand Up @@ -878,8 +878,9 @@ Object.extend(String.prototype, (function() {
isJSON: isJSON,
evalJSON: NATIVE_JSON_PARSE_SUPPORT ? parseJSON : evalJSON,
include: include,
startsWith: startsWith,
endsWith: endsWith,
// Firefox 18+ supports String.prototype.startsWith, String.prototype.endsWith
startsWith: String.prototype.startsWith || startsWith,
endsWith: String.prototype.endsWith || endsWith,

This comment has been minimized.

Copy link
@jdalton

jdalton Apr 11, 2014

Contributor

Should also be noted that Prototype's startsWith and endsWith does not align with ES6. It's missing support for the position argument.

This comment has been minimized.

Copy link
@jdalton

jdalton Apr 11, 2014

Contributor

NM, I see edge has added support for position but isn't totally accurate around resolving the position.

empty: empty,
blank: blank,
interpolate: interpolate
Expand Down

0 comments on commit fa1f899

Please sign in to comment.