npm.io
2.0.1 • Published 4 years ago

check-str

Licence
ISC
Version
2.0.1
Deps
0
Size
1 kB
Vulns
0
Weekly
0

check-str

Check string for an array of words

usage

const checker = require('check-str')

// true
checker(['foo', 'bar'], 'foo bar')

// true
checker(['foo', 'bar'], 'foo OHMYWHATISHEDOINGOVERTHERE bar')

// false
checker(['foo', 'bar'], 'bar foo')

// false
checker(['foo', 'bar'], 'foo what comes after foo again??')

// new feature - now can be case insensitive!
checker(['FOO', 'bar'], 'FoO bAr', true)