getProps()function
getProps(obj: T): ImmutableArray<Prop<T>>
getProps(obj: T | Partial<T>): ImmutableArray<Prop<T>>
getProps(obj: T | Partial<T> | Iterable<Prop<T>>): Iterable<Prop<T>>
| Param | Type | |
|---|---|---|
obj | T | The object to read the props from. required |
obj | TPartial<T> | required |
obj | TPartial<T>Iterable<Prop<T>> | required |
| Return | |
|---|---|
ImmutableArray<Prop<T>> | Iterable set of key/value entry tuples for the object. |
ImmutableArray<Prop<T>> | Immutable array: an array that cannot be changed. |
Iterable<Prop<T>> |
Get the props of an object as a set of entries.
Examples
getProps({ a: 1, b: 2 }); // [["a", 1], ["b", 2]]