UNPKG

imma

Version:

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

9 lines (7 loc) 290 B
'use strict' const arrayMergeWith = require('../array/mergeWith') const objectMergeWith = require('../object/mergeWith') const mergeWith = module.exports = (fn, ...iterables) => Array.isArray(iterables[0]) ? arrayMergeWith(iterables, fn) : objectMergeWith(iterables, fn)