UNPKG

domain-objects

Version:

A simple, convenient way to represent domain objects, leverage domain knowledge, and add runtime validation in your code base.

14 lines (13 loc) 578 B
import { DomainObject } from '../instantiation/DomainObject'; /** * omits all metadata values on a domain object * * relevance: * - often in change detection, metadata values are not relevant, this provides an easy way to omit them * * features: * - utilizes the `.metadata` property of the domain object definition to identify metadata keys * - recall, the default is `id`, `uuid`, `createdAt`, `updatedAt`, `effectiveAt` * - recursive, applies omission deeply */ export declare const omitMetadataValues: <T extends DomainObject<Record<string, any>>>(obj: T) => T;