MCPcopy
hub / github.com/google/earthengine-api / deepCopyMetadata

Function deepCopyMetadata

javascript/src/eeapiclient/domain_object.ts:436–446  ·  view source on GitHub ↗
(source: unknown, target: {})

Source from the content-addressed store, hash-verified

434}
435
436function deepCopyMetadata(source: unknown, target: {}) {
437 let metadata;
438 if (target instanceof Serializable) {
439 metadata = target.getClassMetadata();
440 } else if (source instanceof Serializable) {
441 metadata = source.getClassMetadata();
442 } else {
443 throw new Error('Cannot find ClassMetadata.');
444 }
445 return metadata;
446}
447
448/**
449 * Returns whether or not the two serializable objects are deeply equal. The

Callers 1

deepCopyFunction · 0.85

Calls 1

getClassMetadataMethod · 0.80

Tested by

no test coverage detected