Check whether string contains another string, or one of many strings. Supports locale and case-sensitive / case-insensitive matching.
$ npm install string-has
const has = require('string-has');
has('unicorns', 'corn');
//=> true
has('unicorns', ['uni', 'corn']);
//=> true
Type: string
String to be checked against
Type: string
or array[string]
Single substring or array of substrings for input
to be tested against
Type: object
Type: boolean
Default: true
Should matching be case sensitive, or not.
Type: string
Default: en-US
Locale to use when converting input
and substring
to lowercase for case in-sensitive matching.