2.1.2 • Published 5 years ago

string-includes-x v2.1.2

Weekly downloads
42
License
MIT
Repository
github
Last release
5 years ago

string-includes-x

Determines whether one string may be found within another string.

module.exportsboolean

This method determines whether one string may be found within another string, returning true or false as appropriate.

Kind: Exported member
Returns: boolean - true if the given string is found anywhere within the search string; otherwise, false if not.
Throws:

  • TypeError If target is null or undefined.
  • TypeError If searchString is a RegExp.
ParamTypeDescription
stringstringThe target string.
searchStringstringA string to be searched for within the target string.
positionnumberThe position within the string at which to begin searching for searchString.(defaults to 0).

Example

import strIncludes from 'string-includes-x';

const str = 'To be, or not to be, that is the question.';

includes(str, 'To be'); // true
includes(str, 'question'); // true
includes(str, 'nonexistent'); // false
includes(str, 'To be', 1); // false
includes(str, ('TO BE'); // false
2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.12

5 years ago

2.0.11

5 years ago

2.0.10

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.0

7 years ago

1.0.0

7 years ago