Implemented suggesting improvements

This commit is contained in:
Angelos Chalaris
2018-02-19 15:47:47 +02:00
parent 978f8e9ca1
commit cd4fcb1776
17 changed files with 1126 additions and 1092 deletions

View File

@ -0,0 +1,5 @@
const isAnagram = (str1, str2) => {
const normalize = str => str.toLowerCase().replace(/[^a-z0-9]/gi, '').split('').sort().join('');
return normalize(str1) === normalize(str2);
}
module.exports = isAnagram;