How to use the immutadot/array/map.map function in immutadot

To help you get started, we’ve selected a few immutadot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Zenika / marcel / backoffice / src / dashboard / selectors.js View on Github external
(dashboards, pluginInstances, selectedName) => {
    if (!selectedName || !dashboards[selectedName]) return null
    return flow(
      map('plugins', mapPluginInstancesToProps(pluginInstances)),
      update('plugins', keyBy('instanceId')),
    )(dashboards[selectedName])
  },
)
github Zenika / marcel / backoffice / src / common / utils / mapPluginInstancesToProps.js View on Github external
mapValues(pluginInstances[instanceId], 'props', prop =>
      prop.type === 'pluginList' ? map(prop, 'value', getPluginInstance) : prop,
    )