Linted archive

This commit is contained in:
Angelos Chalaris
2018-09-15 13:52:12 +03:00
parent 3a887a67f4
commit 2ba4b95b47
11 changed files with 77 additions and 51 deletions

View File

@ -7,9 +7,15 @@ Adapted from [here](https://github.com/forrestthewoods/lib_fts/blob/80f3f8c52db5
```js
const isSimilar = (pattern, str) =>
[...str].reduce(
(matchIndex, char) => char.toLowerCase() === (pattern[matchIndex] || '').toLowerCase() ? matchIndex + 1 : matchIndex, 0
) === pattern.length ? true : false;
[...str].reduce(
(matchIndex, char) =>
char.toLowerCase() === (pattern[matchIndex] || '').toLowerCase()
? matchIndex + 1
: matchIndex,
0
) === pattern.length
? true
: false;
```
```js