map

v1.0.0arrow_drop_down
v1.0.0
v0.0.1
STATUS
Passing
DOWNLOADS
634
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 years ago
SIZE
527 B
Returns the results of applying the iteratee to each element of the object.
2 contributors
Install map as a package?
Copied
npm i @bit/bit.utils.object.map
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
map (
object:object,
iteratee:function (val, key)
) : object

Returns the results of applying the iteratee to each element of the object.

Example
const newObj = mapObject({ start: 5, end: 12 }, function(val, key) {
  return val + 5;
});
console.log(newObj) //  { start: 10, end: 17 }
Arguments
object: object
iteratee: function (val, key)
Returns
object

Test Summary

map the mapObject function should exist

Pass

map should map an object and return its value to a new object

Pass
Help and resources