is-substring

v1.0.1
Check if a string contains the given substring
assert check test validate validation is has has-substring substring and 1 more...

is-substring

npm Travis branch npm

Check if a string contains the given substring.

Installation

npm install --save is-substring

Usage

const isSubstring = require('is-substring');

isSubstring('some text', 'text');
//=> true

isSubstring('some text', 'om');
//=> true

isSubstring('some text', 'xts');
//=> false

Related

License

MIT © Lufty Wiranda

npm i is-substring

Metadata

  • MIT
  • >=4
  • Lufty Wiranda
  • released 8/22/2017

Downloads

Maintainers