does include
find whether a string (or arr) contains any, or all of another array of strings.
📦 usage
yarn add does-includenpm i does-include --save
const does-include =
📘 examples
/** * @param {Array<string> | string} haystack * @param * @param * @return */const doesInclude = // or can be destructuredconst any all =
any (default)
const doesInclude = // can is in canada, so true.
all
const doesInclude = // last argument is `any` (default true)// 'canada' and 'can' are both in it, so true