()
| 1 | export function initialize() { |
| 2 | // Source: https://developer.mozilla.org/cs/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill |
| 3 | if (!String.prototype.includes) { |
| 4 | String.prototype.includes = function (search, start) { |
| 5 | 'use strict'; |
| 6 | if (typeof start !== 'number') { |
| 7 | start = 0; |
| 8 | } |
| 9 | if (start + search.length > this.length) { |
| 10 | return false; |
| 11 | } else { |
| 12 | return this.indexOf(search, start) !== -1; |
| 13 | } |
| 14 | }; |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | export default { |
| 19 | name: 'add-string-includes-polyfill', |
nothing calls this directly
no outgoing calls
no test coverage detected