@edgarberlinck/string-utils
v1.1.0
Published
Collection of alot of string ultilities which I use all the time.
Downloads
3
Readme
String Utils
Collection of alot of string ultilities which I use all the time.
noSlug (string)
Return a new string without special characters and with lower case
Example
console.log(noSlug('Capitão'))
>> Should return 'capitao'
includeAll (target, term)
Return true if target contains all words in term
console.log(includeAll('Edgar Muniz Berlinck', 'Berlinck'))
>> Should return *true*
console.log(includeAll('Edgar Muniz Berlinck', 'Muniz Berlinck'))
>> Should return *true*
console.log(includeAll('Edgar Muniz Berlinck', 'Edgar Berlinck'))
>> Should return *true*
console.log(includeAll('Edgar Muniz Berlinck', 'Gostosão Berlinck'))
>> Should return *false*