1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/lib/uuid.ts
2020-11-05 16:58:23 +00:00

14 lines
339 B
TypeScript

const createUuidV4 = require('uuid/v4');
const { customAlphabet } = require('nanoid/non-secure');
const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 22);
export default {
create: function() {
return createUuidV4().replace(/-/g, '');
},
createNano: function() {
return nanoid();
},
};