Function
omit
@ng-forge/dynamic-forms
Creates a new object without the specified keys
Native replacement for lodash omit()
Signature
function omit<
T extends object,
K extends keyof T
>(
obj: T,
keys: K[]
): Omit<T, K>Type Parameters
| Name | Constraint | Default | Description |
|---|---|---|---|
T | object | - | - |
K | keyof T | - | - |
Parameters
| Name | Type | Description |
|---|---|---|
obj | T | - Source object |
keys | K[] | - Keys to omit |
Returns
Omit<T, K>
Examples
const obj = { a: 1, b: 2, c: 3 };
omit(obj, ['b']); // { a: 1, c: 3 }packages/dynamic-forms/src/lib/utils/object-utils.ts:159