Skip to content

Commit

Permalink
array added
Browse files Browse the repository at this point in the history
  • Loading branch information
LandRover committed Jul 11, 2024
1 parent 863c638 commit cfcf278
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/utils/array.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const existsInArray = (input = '', listOfWords = []) => {
return listOfWords.some(keyword => String(input).toLowerCase().includes(keyword.toLowerCase()));
};

export {
existsInArray,
};
2 changes: 1 addition & 1 deletion src/utils/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const decodeHTMLEntities = function(text) {
return text;
};

const cleanNames = function (text) {
const cleanNames = function(text) {
return decodeHTMLEntities(text)
.replace(/( עם |feat\.|Ft\.|Featuring|)/g, '')
.replace(/(&|,)/g, '')
Expand Down

0 comments on commit cfcf278

Please sign in to comment.