diff options
author | EuAndreh <eu@euandre.org> | 2021-08-15 19:21:04 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-08-15 19:21:04 -0300 |
commit | 2c02a729ce3649dd16d9ec4a18029cde80df8d4c (patch) | |
tree | aaf13900684bb8545b774d2a7c8a57958fe2ae83 /_pastebins/2021-04-03-javascript-naive-slugify.md | |
parent | aux/: Update (diff) | |
download | euandre.org-2c02a729ce3649dd16d9ec4a18029cde80df8d4c.tar.gz euandre.org-2c02a729ce3649dd16d9ec4a18029cde80df8d4c.tar.xz |
_pastebins/: Tweak heading and links of pastebins just because
Diffstat (limited to '')
-rw-r--r-- | _pastebins/2021-04-03-javascript-naive-slugify.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/_pastebins/2021-04-03-javascript-naive-slugify.md b/_pastebins/2021-04-03-javascript-naive-slugify.md index ce038fd..f765495 100644 --- a/_pastebins/2021-04-03-javascript-naive-slugify.md +++ b/_pastebins/2021-04-03-javascript-naive-slugify.md @@ -4,6 +4,8 @@ title: JavaScript naive slugify date: 2021-04-03 +updated_at: 2021-08-15 + layout: post lang: en @@ -15,8 +17,8 @@ ref: javascript-naive-slugify ```javascript const s = "Pézão: açaí, saci-pererê."; -function slugify(s) { - return s +const slugify = s => + s .toLowerCase() .replaceAll(":", "") .replaceAll(".", "") @@ -33,7 +35,6 @@ function slugify(s) { .replaceAll("ú", "u") .replaceAll("ü", "u") .replaceAll("ç", "c"); -} console.log(slugify(s)); ``` |