Travis build: 1751 [cron]
This commit is contained in:
5
test/isSimilar/isSimilar.js
Normal file
5
test/isSimilar/isSimilar.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const isSimilar = (pattern, str) =>
|
||||
[...str].reduce(
|
||||
(matchIndex, char) => char.toLowerCase() === (pattern[matchIndex] || '').toLowerCase() ? matchIndex + 1 : matchIndex, 0
|
||||
) === pattern.length ? true : false;
|
||||
module.exports = isSimilar;
|
||||
Reference in New Issue
Block a user