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

Method clone

lib/src/resource.ts:85–95  ·  view source on GitHub ↗

* Creates a clone of the Resource, which makes sure the reference is * different from the previous one. This can be useful when doing reference compares.

()

Source from the content-addressed store, hash-verified

83 * different from the previous one. This can be useful when doing reference compares.
84 */
85 clone(): Resource {
86 const res = new Resource(this.subject);
87 res.propvals = this.propvals;
88 res.destroy = this.destroy;
89 res.new = this.new;
90 res.error = this.error;
91 res.commitError = this.commitError;
92 res.commitBuilder = this.commitBuilder.clone();
93 res.appliedCommitSignatures = this.appliedCommitSignatures;
94 return res;
95 }
96
97 /** Checks if the resource is both loaded and free from errors */
98 isReady(): boolean {

Callers 2

saveMethod · 0.45
addResourceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected