Added Jay's POV scraper.

This commit is contained in:
2020-01-10 22:10:11 +01:00
parent 53fcb6a5cd
commit f572f38b5c
16 changed files with 123 additions and 2 deletions

View File

@@ -1,7 +1,9 @@
'use strict';
function slugify(string) {
return string.trim().toLowerCase().match(/\w+/g).join('-');
function slugify(string, encode = false) {
const slug = string.trim().toLowerCase().match(/\w+/g).join('-');
return encode ? encodeURI(slug) : slug;
}
module.exports = slugify;