@svizzle/utils/iterable-number

Methods

(static) getLength(iterable) → {number}

Source:
Since:
  • 0.1.0

Get the length of the iterable

Example
> getLength('a')
1
> getLength('two')
3
> getLength([10])
1
> getLength([3, 7])
2
> function func () {
	return getLength(arguments);
}
> func()
0
> func()
0
> func('a', 'b')
2
Parameters:
Name Type Description
iterable iterable
Returns:
Type
number