MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / createSubject

Method createSubject

lib/src/store.ts:84–88  ·  view source on GitHub ↗

Creates a random URL. Add a classnme (e.g. 'persons') to make a nicer name

(className?: string)

Source from the content-addressed store, hash-verified

82
83 /** Creates a random URL. Add a classnme (e.g. 'persons') to make a nicer name */
84 createSubject(className?: string): string {
85 const random = Math.random().toString(36).substring(2);
86 className = className ? className : 'things';
87 return `${this.getServerUrl()}/${className}/${random}`;
88 }
89
90 /** Fetches a resource by URL and adds it to the store. */
91 async fetchResource(

Callers 4

NewIntanceButtonFunction · 0.80
createInviteFunction · 0.80
NewFormFunction · 0.80
addElementFunction · 0.80

Calls 1

getServerUrlMethod · 0.95

Tested by

no test coverage detected