Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private getDigest(propertyRep: Ro.PropertyMember): string | null {
const parent = propertyRep.parent;
if (parent instanceof Ro.DomainObjectRepresentation) {
if (parent.isTransient()) {
return Ro.withNull(parent.etagDigest);
}
}
return null;
}
function isSameObject(object: Ro.DomainObjectRepresentation | null | undefined, type: string, id?: string) {
if (object) {
const sid = object.serviceId();
return sid ? sid === type : (object.domainType() === type && object.instanceId() === Ro.withNull(id));
}
return false;
}