UNPKG

imma

Version:

A collection of functions for dealing with native arrays and objects immutably

8 lines (6 loc) 190 B
'use strict' const objectMap = require('../object/map') const map = module.exports = (iterable, fn) => Array.isArray(iterable) ? iterable.map(fn) : objectMap(iterable, fn)