Yeast: A tiny growing id generator.

@returns {String} A unique id.
@api public
484486
function yeast() {
  var now = encode$1(+new Date());

  if (now !== prev) return (seed = 0), (prev = now);
  return now + "." + encode$1(seed++);
}
354990
function() {
    var captures;
    if (captures = /^-*[_a-zA-Z$][-\w\d$]*/.exec(this.str)) {
      this.skip(captures);
      return new Token('ident', new nodes.Ident(captures[0]));
    }
  }
727000
public static String createUniqueIdentifier() {
		String id;
		do {
			id = UUID.randomUUID().toString();
		} while (getSREFromId(id) != null);
		return id;
	}
966105
function identifierFactory (ast, reserved) {
  reserved = reserved || new Set

  ast.find(j.Identifier).forEach(path => {
    reserved.add(path.node.name)
  })

  ast.find(j.FunctionDeclaration).forEach(path => {
    reserved.add(path.node.id.name)
  })

  function identifier (name, suffix) {
    return j.identifier(identifier.string(name, suffix))
  }

  identifier.string = function (name, suffix) {
    let sfx = suffix == null ? '' : suffix
      , unique = name + sfx
      , n = 0

    while (reserved.has(unique)) {
      unique = name + (n++) + sfx
    }

    return unique
  }

  return identifier
}
662359
function samlCreateId() 
   {
      $rndChars = 'abcdefghijklmnop';
      $rndId = '';
      for ($i = 0; $i < 40; $i++ ) {
         $rndId .= $rndChars[rand(0,strlen($rndChars)-1)];
      }
      return $rndId;
   }
288687
def _unique_id(self, prefix):
        
        _id = self._id_gen
        self._id_gen += 1
        return prefix + str(_id)
669091
public static final long generateId() {
        long id = 0;
        // add new seed material from current time
        random.addSeedMaterial(ThreadLocalRandom.current().nextLong());
        // get a new id
        byte[] bytes = new byte[16];
        // get random bytes
        random.nextBytes(bytes);
        for (int i = 0; i < bytes.length; i++) {
            id += ((long) bytes[i] & 0xffL) << (8 * i);
        }
        //System.out.println("Id: " + id);
        return id;
    }
698017
function Id(bracket, round, match) {
  if (!(this instanceof Id)) {
    return new Id(bracket, round, match);
  }
  this.s = bracket;
  this.r = round;
  this.m = match;
}
672046
function KdbxUuid(ab) {
    if (ab === undefined) {
        ab = new ArrayBuffer(UuidLength);
    }
    if (typeof ab === 'string') {
        ab = ByteUtils.base64ToBytes(ab);
    }
    this.id = ab.byteLength === 16 ? ByteUtils.bytesToBase64(ab) : undefined;
    this.empty = true;
    if (ab) {
        var bytes = new Uint8Array(ab);
        for (var i = 0, len = bytes.length; i < len; i++) {
            if (bytes[i] !== 0) {
                this.empty = false;
                return;
            }
        }
    }
}
704804
function(target) {
      var id = 'unknown';

      if (target && typeof target.innerHTML === 'string') {
        if (target.id) {
          id = '#' + target.id;
        } else if (target.nodeName) {
          id = target.nodeName.toLowerCase();

          if (target.className) {
            var classes = target.className.split(/\s+/);
            for (var i = 0, length = classes.length; i < length; i++) {
              id += '.' + classes[i];
            }
          }
        }
      }

      return id;
    }
1298201
function uuid() {
  return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
    (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
  )
}
1279275
function getContentUid(content) {
    var id = content.id_;
    if (!id)
      id = content.id_ = contentUidCounter++;
    return id;
  }
73064
function getPseudoUUID() {
  var chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
  var len = chars.length;
  var ret = [];

  for (var i = 0; i < 10; i++) {
    ret.push(chars[Math.floor(Math.random() * len)]);
  }
  return ret.join('');
}
425054
function generateRandomClientId() {
    var length = 22;
    var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    var result = '';
    for (var i = length; i > 0; --i) {
        result += chars[Math.round(Math.random() * (chars.length - 1))];
    }
    return result;
}
1368872
function generateUniqueHubId() {
		//TODO ensure generated hub id is unique (not in db)
		// do {
		var length = 10;
		var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV0123456789';
		var s = '';
		for (var i=0; i<length; i++) {
			s += letters.charAt(Math.floor(Math.random() * letters.length));
		}
		// } while (s == 0); //TODO actually check in db for value existence

		return s;
	}
1223594
function randomId () {
  const res = new Array(32)
  const alphabet = 'ABCDEF0123456789'
  for (let i = 0; i < 32; i++) {
    res[i] = alphabet[Math.floor(Math.random() * 16)]
  }
  return res.join('')
}
542725
function () {
                var res = idMgr.getId();
                if (this._dynamicIds) {
                    this._dynamicIds.push(res);
                } else {
                    this._dynamicIds = [res];
                }
                return res;
            }