@strapi/utils
Version:
Shared utilities for the Strapi packages
10 lines (8 loc) • 302 B
JavaScript
// Using timestamp (milliseconds) to be sure it is unique
// + converting timestamp to base 36 for better readibility
const timestampCode = (date)=>{
const referDate = date ?? new Date();
return referDate.getTime().toString(36);
};
export { timestampCode };
//# sourceMappingURL=dates.mjs.map