Ponyfill: A polyfill that doesn't overwrite the native method
$ npm install --save string-includes
const stringIncludes = require('string-includes');
stringIncludes('unicorns and rainbows', 'unicorns');
//=> true
stringIncludes('unicorns and rainbows', 'rainbows');
//=> true
stringIncludes('unicorns and rainbows', 'unicorns', 1);
//=> false
Type: string
The string to search in.
Type: string
A string to be searched for.
Type: Number
Default: 0
The position in this string at which to begin searching for searchString
.
MIT © Kevin Martensson