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
/
remove.js
9 lines
(7 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
'use strict'
const
arrayRemove =
require
(
'../array/remove'
)
const
objectRemove =
require
(
'../object/remove'
)
const
remove =
module
.
exports
=
(
iterable, key
) =>
Array
.
isArray
(iterable) ?
arrayRemove
(iterable, key) :
objectRemove
(iterable, key)