get rid of usages of substr which is deprecated
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ const ondemandMetadata = fs
|
||||
.reverse()
|
||||
.map(file => yaml.load(fs.readFileSync(`./data/on-demand/${file}`, 'utf8')));
|
||||
const truncate = text =>
|
||||
text.length > 170 ? text.substr(0, 170) + '...' : text;
|
||||
text.length > 170 ? text.slice(0, 170) + '...' : text;
|
||||
|
||||
const addVideoDocsLink = '/docs/overview/support';
|
||||
const defaultIconUrl = 'img/logo-gradient-on-dark.svg';
|
||||
|
||||
@@ -19,7 +19,7 @@ const pluginMetadata = fs
|
||||
.map(file => yaml.load(fs.readFileSync(`./data/plugins/${file}`, 'utf8')))
|
||||
.sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()));
|
||||
const truncate = text =>
|
||||
text.length > 170 ? text.substr(0, 170) + '...' : text;
|
||||
text.length > 170 ? text.slice(0, 170) + '...' : text;
|
||||
|
||||
const newForDays = 100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user