How to use uuid.stringify:
GitHub: vatesfr/xen-orchestra
222 223 224 225 226 227 228 229 230 231
// // Due to a bug introduced in a1bcd35e2 const duplicate = vhdById.get(UUID.stringify(vhd.footer.uuid)) let vhdKept = vhd if (duplicate !== undefined) { logWarn('uuid is duplicated', { uuid: UUID.stringify(vhd.footer.uuid) }) if (duplicate.containsAllDataOf(vhd)) { logWarn(`should delete ${path}`) vhdKept = duplicate vhds.delete(path)
202
560
40
See more examples
How to use uuid.v1:
GitHub: keyteki/keyteki
138 139 140 141 142 143 144 145 146 147
let deck = Object.assign( {}, { name: req.body.name, uuid: uuid.v1(), username: req.user.username, pods: req.body.pods } );
79
121
8
See more examples
How to use uuid.v4:
GitHub: CapacitorSet/box-js
58 59 60 61 62 63 64 65 66 67 68 69 70
function hash(algo, string) { return crypto.createHash(algo).update(string).digest("hex"); } const getUUID = uuid.v4; function logIOC(type, value, description) { log("info", "IOC: " + description); IOC.push({type, value, description});
81
533
36
See more examples