mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
14 lines
339 B
TypeScript
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();
|
||
|
},
|
||
|
};
|