how to create uuid in javascript
function uuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
var userID=uuid();//something like: "ec0c22fa-f909-48da-92cb-db17ecdb91c5"
Also in JavaScript:
- img onerror
- nested for loop javascript
- javascript for eac loop
- vendor bundle base js and bootstrap min js conflict
- add dev dependency yarn
- javascript slice
- function click anywhere javascript
- check if 2 strings matches js
- how to make a scrollable list component in react js
- rafraichir page javascript
- angular maxlength directive input type number
- JavaScript banner
- usestate access previous state
- how do I make and animation start on click in js
- mongoose if empty string is provided use default
- jquery remove all alerts
- get installed plugins in a browser via javascript
- google sign up react npm
- jquery make readonly textbox
- javascript sum array of objects
- validate email jquery
- jquery populate select from json
- javascript 2 decimal float array elements
- Node Sass could not find a binding for your current environment