diff --git a/libs/common.js b/libs/common.js index 1944e627..cc1fbd1c 100644 --- a/libs/common.js +++ b/libs/common.js @@ -31,4 +31,12 @@ const mergeDeep = function(...objects) { return prev; }, {}); } +const arrayContains = (query,theArray) => { + var foundQuery = false + theArray.forEach((value) => { + if(value.indexOf(query) > -1)foundQuery = true + }) + return foundQuery +} exports.mergeDeep = mergeDeep +exports.arrayContains = arrayContains