- Preparing search index...
- The search index is not available
@giraugh/tools
- filterObject<TObj>(obj, predFn): Partial<TObj>
-
Type Parameters
-
TObj extends Record<PropertyKey, any>
Parameters
-
obj: TObj
-
predFn: ((key, value, object) => boolean)
-
- (key, value, object): boolean
-
Parameters
-
key: keyof TObj
-
value: TObj[keyof TObj]
-
object: TObj
Returns boolean
Returns Partial<TObj>
Filter the entries of an object using a predicate function
Returns
obj
with entries removed as determined bypredFn
Example
Example