Small refactoring, several tests added

This commit is contained in:
barsdeveloper
2023-01-26 22:02:43 +01:00
parent abc19f831a
commit 60b477ac62
24 changed files with 594 additions and 68 deletions

View File

@@ -0,0 +1,4 @@
/** @param {String[]} words */
export default function getFirstWordOrder(words) {
return new RegExp("(?:.|\\n)+" + words.map(word => word + "(?:.|\\n)+").join("") + "(?:.|\\n)+")
}