MCPcopy
hub / github.com/streetwriters/notesnook / fourRandomChars

Function fourRandomChars

packages/clipper/src/utils.ts:170–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 return "u" + fourRandomChars() + index++;
169
170 function fourRandomChars() {
171 /* see http://stackoverflow.com/a/6248722/2519373 */
172 return (
173 "0000" + ((Math.random() * Math.pow(36, 4)) << 0).toString(36)
174 ).slice(-4);
175 }
176}
177
178function dataAsUrl(content: string, type: string) {

Callers 1

uidFunction · 0.85

Calls 2

sliceMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected