From 6f2fafce59a103ae10bf7ac09c5ea2c8649ef6c0 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Mon, 19 Feb 2018 15:53:50 +0200 Subject: [PATCH] Code quality improvement --- snippets/isAnagram.md | 2 +- test/isAnagram/isAnagram.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/isAnagram.md b/snippets/isAnagram.md index 492f54988..2cf9cc3cf 100644 --- a/snippets/isAnagram.md +++ b/snippets/isAnagram.md @@ -8,7 +8,7 @@ Use `String.toLowerCase()`, `String.replace()` with an appropriate regular expre const isAnagram = (str1, str2) => { const normalize = str => str.toLowerCase().replace(/[^a-z0-9]/gi, '').split('').sort().join(''); return normalize(str1) === normalize(str2); -} +}; ``` ```js diff --git a/test/isAnagram/isAnagram.js b/test/isAnagram/isAnagram.js index 762ce25f8..df206c4b9 100644 --- a/test/isAnagram/isAnagram.js +++ b/test/isAnagram/isAnagram.js @@ -1,5 +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; \ No newline at end of file +}; +module.exports = isAnagram;