UNPKG

moleculer-zod-validator

Version:

A validator for the Moleculer microservice framework to allow the use of Zod.

10 lines (9 loc) 521 B
/** * Performs a deep mutation of an existing object to equal a given source object. * * Adapted from this package: https://github.com/jeremyhewett/mutate-object * @param {object} destination - The object to mutate * @param {object} source - The object that the destination should be mutated to equal * @param {boolean} [preserveRootProps=true] - Whether undefined props on the root level should be deleted */ export declare function mutateObject(destination: any, source: any, preserveRootProps?: boolean): void;