UNPKG
imma
Version:
latest (0.0.1)
0.0.1
A collection of functions for dealing with native arrays and objects immutably
imma
/
lib
/
general
/
merge.js
9 lines
(7 loc)
•
250 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
'use strict'
const
arrayMerge =
require
(
'../array/merge'
)
const
objectMerge =
require
(
'../object/merge'
)
const
merge =
module
.
exports
=
(
...iterables
) =>
Array
.
isArray
(iterables[
0
]) ?
arrayMerge
(iterables) :
objectMerge
(iterables)