mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
feat: finalize update junior
This commit is contained in:
3
src/core/utils/patch.util.ts
Normal file
3
src/core/utils/patch.util.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export const setIf = <T, K extends keyof T>(obj: T, key: K, val: T[K] | undefined) => {
|
||||
if (typeof val !== 'undefined') obj[key] = val as T[K];
|
||||
};
|
||||
Reference in New Issue
Block a user