MCPcopy
hub / github.com/jeromegn/Backbone.localStorage / s4

Function s4

src/utils.js:6–9  ·  view source on GitHub ↗

Generates 4 random hex digits * @returns {string} 4 Random hex digits

()

Source from the content-addressed store, hash-verified

4 * @returns {string} 4 Random hex digits
5*/
6function s4() {
7 const rand = (1 + Math.random()) * 0x10000;
8 return (rand | 0).toString(16).substring(1)
9}
10
11/** Generate a pseudo-guid
12 * @returns {string} A GUID-like string.

Callers 1

guidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected