MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / yeast

Function yeast

sdk/src/CloudSocketClientLib.js:4585–4592  ·  view source on GitHub ↗

* Yeast: A tiny growing id generator. * * @returns {String} A unique id. * @api public

()

Source from the content-addressed store, hash-verified

4583 * @api public
4584 */
4585 function yeast() {
4586 var now = encode(+ new Date());
4587
4588 if (now !== prev)
4589 return seed = 0,
4590 prev = now;
4591 return now + '.' + encode(seed++);
4592 }
4593
4594 //
4595 // Map each character to its index.

Callers 1

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected