Switched to tabs. Adding missing actor entries when scraping actors, with batch ID.

This commit is contained in:
2020-05-14 04:26:05 +02:00
parent f1eb29c713
commit 11eb66f834
178 changed files with 16594 additions and 16929 deletions

View File

@@ -1,30 +1,30 @@
'use strict';
function slugify(string, delimiter = '-', {
encode = false,
limit = 1000,
encode = false,
limit = 1000,
} = {}) {
if (!string) {
return string;
}
if (!string) {
return string;
}
const slugComponents = string.trim().toLowerCase().match(/\w+/g);
const slugComponents = string.trim().toLowerCase().match(/\w+/g);
if (!slugComponents) {
return '';
}
if (!slugComponents) {
return '';
}
const slug = slugComponents.reduce((acc, component, index) => {
const accSlug = `${acc}${index > 0 ? delimiter : ''}${component}`;
const slug = slugComponents.reduce((acc, component, index) => {
const accSlug = `${acc}${index > 0 ? delimiter : ''}${component}`;
if (accSlug.length < limit) {
return accSlug;
}
if (accSlug.length < limit) {
return accSlug;
}
return acc;
}, '');
return acc;
}, '');
return encode ? encodeURI(slug) : slug;
return encode ? encodeURI(slug) : slug;
}
module.exports = slugify;