MCPcopy Index your code
hub / github.com/atomicdata-dev/atomic-data-browser / notify

Method notify

lib/src/store.ts:242–251  ·  view source on GitHub ↗

Let's subscribers know that a resource has been changed. Time to update your views!

(resource: Resource)

Source from the content-addressed store, hash-verified

240
241 /** Let's subscribers know that a resource has been changed. Time to update your views! */
242 notify(resource: Resource): void {
243 const subject = resource.getSubject();
244 const subscribers = this.subscribers.get(subject);
245 if (subscribers == undefined) {
246 return;
247 }
248 subscribers.map(callback => {
249 callback(resource);
250 });
251 }
252
253 /** Removes (destroys / deletes) resource from this store */
254 removeResource(subject: string): void {

Callers 4

addResourceMethod · 0.95
setAsyncFunction · 0.80
handleErrorFunction · 0.80
handleInfoFunction · 0.80

Calls 2

getSubjectMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected