Add ability to make junk-drawer private-ish
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
interface SlugOptions {
|
||||
year: boolean;
|
||||
month: boolean;
|
||||
@@ -36,7 +38,7 @@ export const generateUniqueSlug = (
|
||||
hour ? String(date.getHours()).padStart(2, '0') : '',
|
||||
minute ? String(date.getMinutes()).padStart(2, '0') : '',
|
||||
second ? String(date.getSeconds()).padStart(2, '0') : '',
|
||||
random ? Math.random().toString(36).substring(2, 15) : '',
|
||||
random ? '-' + v4() : '',
|
||||
].filter(Boolean);
|
||||
|
||||
return parts.join(separator);
|
||||
|
Reference in New Issue
Block a user