flatMap()
Iterates through each item in an array or an object, passing the item to a mapping function, and flattens the result into the array or object.
This function is valid in v2.13.0 to v2.24.3. This function has been downloaded 60 times.arrOrObj
. The return value will be flattened into the array or object returned from flatMap()
.this
keyword within mapper
. If not given this will refer to the global object.arrOrObj
was an array then an array will be returned, otherwise an object will be returned. If an array, the values returned from mapper
for each item will occupy the position of the original item in this new array. If an object, the values returned from mapper
will be used instead of the items that were passed in and the new object will use the key(s) from the objects returned for this new object.This function directly requires the following functions which are included automatically:
extend()
has()