MCPcopy Index your code
hub / github.com/pubkey/rxdb / randomToken

Function randomToken

src/plugins/utils/utils-string.ts:10–18  ·  view source on GitHub ↗
(length: number = 10)

Source from the content-addressed store, hash-verified

8 * @link http://stackoverflow.com/a/1349426/3443137
9 */
10export function randomToken(length: number = 10): string {
11 let text = '';
12
13 for (let i = 0; i < length; i++) {
14 text += COUCH_NAME_CHARS.charAt(Math.floor(Math.random() * COUCH_NAME_CHARS.length));
15 }
16
17 return text;
18}
19
20
21/**

Callers 15

createRxDatabaseFunction · 0.90
removeRxDatabaseFunction · 0.90
runPerformanceTestsFunction · 0.90
getPasswordFunction · 0.90
createFunction · 0.90
createBySchemaFunction · 0.90
createAttachmentsFunction · 0.90
createNoCompressionFunction · 0.90
createAgeIndexFunction · 0.90
multipleOnSameDBFunction · 0.90

Calls

no outgoing calls

Tested by 15

getFirestoreStateFunction · 0.68
startReplicationFunction · 0.68
createDatabaseFunction · 0.68
cleanUpServerFunction · 0.68
startReplicationFunction · 0.68
openStorageInstanceFunction · 0.68
syncCollectionFunction · 0.68
startReplicationFunction · 0.68
startReplicationFunction · 0.68
syncLiveFunction · 0.68
syncCollectionFunction · 0.68
startReplicationFunction · 0.68