UNPKG

contenido

Version:

Contenido is a library with a set of tools to help you create your own rich text editor on top of draft-js without thinking about how to handle things.

9 lines (6 loc) 223 B
const generateKey = (): string => { const timestamp = Date.now().toString(36); const random = Math.random().toString(36).substring(2, 7); return `${timestamp}${random}`.toUpperCase(); }; export default generateKey;