1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/ReactNativeClient/lib/uuid.ts

14 lines
339 B
TypeScript
Raw Normal View History

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();
},
};