mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
14 lines
238 B
JavaScript
14 lines
238 B
JavaScript
|
let uniqueId = 0;
|
||
|
|
||
|
const getUniqueName = (prefix = 'id') => {
|
||
|
uniqueId += 1;
|
||
|
return `${prefix} ${uniqueId}`;
|
||
|
};
|
||
|
|
||
|
const getSlug = str => str.toLowerCase().split(' ').join('-');
|
||
|
|
||
|
module.exports = {
|
||
|
getUniqueName,
|
||
|
getSlug
|
||
|
};
|