mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Release v1.0.0 🎉
This commit is contained in:
8
lib/utils.js
Executable file
8
lib/utils.js
Executable file
@@ -0,0 +1,8 @@
|
||||
function isOneOf (word, arr) {
|
||||
const expression = String.raw`\b(${arr.join('|')})\b`;
|
||||
const blacklist = new RegExp(expression, 'ig');
|
||||
|
||||
return blacklist.test(word)
|
||||
}
|
||||
|
||||
module.exports = { isOneOf };
|
||||
Reference in New Issue
Block a user