aboutsummaryrefslogtreecommitdiff
path: root/_pastebins
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-04-24 19:01:07 -0300
committerEuAndreh <eu@euandre.org>2021-04-24 19:06:02 -0300
commita8040fd10451f546705d97a2be8f3351b0bf43bb (patch)
tree40f77f7392318dffc37ae695740fb8fece74be4f /_pastebins
parentUpdate locale files (diff)
downloadeuandre.org-a8040fd10451f546705d97a2be8f3351b0bf43bb.tar.gz
euandre.org-a8040fd10451f546705d97a2be8f3351b0bf43bb.tar.xz
s/tabs/spaces/g
Diffstat (limited to '')
-rw-r--r--_pastebins/2021-04-03-javascript-naive-slugify.md34
1 files changed, 17 insertions, 17 deletions
diff --git a/_pastebins/2021-04-03-javascript-naive-slugify.md b/_pastebins/2021-04-03-javascript-naive-slugify.md
index 05251c7..ce038fd 100644
--- a/_pastebins/2021-04-03-javascript-naive-slugify.md
+++ b/_pastebins/2021-04-03-javascript-naive-slugify.md
@@ -16,23 +16,23 @@ ref: javascript-naive-slugify
const s = "Pézão: açaí, saci-pererê.";
function slugify(s) {
- return s
- .toLowerCase()
- .replaceAll(":", "")
- .replaceAll(".", "")
- .replaceAll(",", "")
- .replaceAll("-", "")
- .replaceAll("á", "a")
- .replaceAll("ã", "a")
- .replaceAll("à", "a")
- .replaceAll("é", "e")
- .replaceAll("ê", "e")
- .replaceAll("í", "i")
- .replaceAll("ó", "o")
- .replaceAll("ô", "o")
- .replaceAll("ú", "u")
- .replaceAll("ü", "u")
- .replaceAll("ç", "c");
+ return s
+ .toLowerCase()
+ .replaceAll(":", "")
+ .replaceAll(".", "")
+ .replaceAll(",", "")
+ .replaceAll("-", "")
+ .replaceAll("á", "a")
+ .replaceAll("ã", "a")
+ .replaceAll("à", "a")
+ .replaceAll("é", "e")
+ .replaceAll("ê", "e")
+ .replaceAll("í", "i")
+ .replaceAll("ó", "o")
+ .replaceAll("ô", "o")
+ .replaceAll("ú", "u")
+ .replaceAll("ü", "u")
+ .replaceAll("ç", "c");
}
console.log(slugify(s));