Nodejs Utililty Methods Random ID Get

List of utility methods to do Random ID Get

Description

The list of methods to do Random ID Get are organized into topic(s).

Method

generateRandomId(length)
function generateRandomId(length) {
    "use strict";
  var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", returnValue = "", x, i;
    for (x = 0; x < length; x += 1) {
        i = Math.floor(Math.random() * 62);
        returnValue += chars.charAt(i);
    return "JS_" + returnValue;