I'm trying to create globally-unique identifiers in JavaScript.  I'm not sure what routines are available on all browsers, how "random" and seeded the built-in random number generator is, etc..  The GUID / UUID should be at least 32...
How to check if variable contains valid UUID/GUID identifier?  I'm currently interested only in validating types 1 and 4, but it should not be a limitation to your answers....
I'm currently generating UUIDs in Javascript with this function (Create GUID / UUID in JavaScript?):  lucid.uuid = function() {     return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {         var r = Math.random()...
I found the question here:   Create GUID / UUID in JavaScript?  The answer provides the following JS:  function S4() {    return (((1+Math.random())*0x10000)|0).toString(16).substring(1); }  function guid() {    return (S4()+S4()+"-"+S4()+...
I need to generate a random UUID in Javascript and get the Least and Most significant bits from it (like in Java's UUID class). I found enough scripts to generate the UUID, but wasn't able to find a script that gets the least and most signifi...
I'm using the following typescript method to generate UUIDs. The code itself is basically the typescript version of this stackoverflow answer.  generateUUID(): string {     let date = new Date().getTime();     if (window.performance && ty...
I found this answer Is there any way to generate the same UUID based on the seed string in JDK or some library? but this is the java way.  I need to the same, but in javascript, i can use any npm module or any library or custom function.     You can...
I'm using nodeJS and cassandra  I'm currently using UUID v1 as unique id  but, I think uuid is too long  I want to generate numeric unique id like fb and G+, which is shorter  and don't have to check if the id exist in DB or not before in...
We have a Java UUID being written to a ByteArrayOutputStream. Then bytearray of that ByteArrayOutputStream is base64 encoded and sent in a JSON. The encoding process is as follows.  public String uuidToString(UUID uuidObj) {     final ByteArrayOutput...
I try to convert GUID in base64 string for some reasons in Node.js  My function is   function encode(guid) {     let buffer = new Buffer(guid.replace(/-/g, ""), 'hex');     let ret = buffer.toString('base64');     ret = ret.re...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.