const guid = function()

in lib/utils.js [9:24]


const guid = function (input) {
  if (!input || input.length < 1) { // no parameter supplied
    return uuidv4(); // return guid v4() uuid
  } else { // create a consistent (non-random!) UUID
    let hash = crypto.createHash('sha256').update(input.toString()).digest('hex').substring(0, 36);
    let chars = hash.split('');
    chars[8] = '-';
    chars[13] = '-';
    // chars[14] = '4';
    chars[18] = '-';
    // chars[19] = '8';
    chars[23] = '-';
    hash = chars.join('');
    return hash;
  }
};