Skip to content
0

katanakit-js / useOmit

Function: useOmit() ​

ts
function useOmit<T, K>(obj, keys): Omit<T, K>;

Defined in: src/core/services/utils.service.ts:512

Omits the listed keys from an object, returning a shallow copy without them.

Type Parameters ​

Type Parameter
T extends object
K extends string | number | symbol

Parameters ​

ParameterType
objT
keysK[]

Returns ​

Omit<T, K>

Example ​

ts
useOmit(user, ["password"]);

Released under the MIT License.