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>>
ParamType
objT
The object to read the props from. required
objT
Partial<T>
required
objT
Partial<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]]