Last active
June 3, 2019 15:20
-
-
Save ypcrts/2a1f9043f12f7105e3a0b14a788f1f90 to your computer and use it in GitHub Desktop.
Revisions
-
ypcrts revised this gist
Jun 3, 2019 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ (function () { var q = [ "John Smith, "Wretchéd Hôrse" ] for (let i=0; i < q.length; i++) { const fullname = q[i].split(",")[0].toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ""); const names = fullname.split(" "); const first = names[0]; const family = names[1]; q[i] = first[0] + family; } console.log(q) return q })(); -
ypcrts created this gist
Jun 3, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ (function () { var s = new Set(); document.querySelectorAll('.actor-name').forEach( e=> { s.add(e.innerText) }); console.log(s) })()