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
/
size.js
8 lines
(6 loc)
•
183 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
'use strict'
const
objectSize =
require
(
'../object/size'
)
const
size =
module
.
exports
=
iterable
=>
Array
.
isArray
(iterable) ? iterable.
length
:
objectSize
(iterable)