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

Function setAsync

react/src/hooks.ts:292–301  ·  view source on GitHub ↗

* Validates and sets a property / value combination. Will invoke the * callback if the value is not valid.

()

Source from the content-addressed store, hash-verified

290 * callback if the value is not valid.
291 */
292 async function setAsync() {
293 try {
294 await resource.set(propertyURL, newVal, store, validate);
295 handleValidationError && handleValidationError(null);
296 // commit && (await resource.save(store));
297 store.notify(resource);
298 } catch (e) {
299 handleValidationError ? handleValidationError(e) : console.log(e);
300 }
301 }
302 await setAsync();
303 }
304

Callers 1

validateAndSetFunction · 0.85

Calls 2

setMethod · 0.80
notifyMethod · 0.80

Tested by

no test coverage detected