time-to-botec/js/node_modules/@stdlib/assert/is-iterable-like/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

39 lines
937 B
Plaintext

{{alias}}( value )
Tests if a value is iterable-like.
In order to be iterable, an object must implement the @@iterator method,
which, when called, returns an iterator protocol-compliant object.
An iterator protocol-compliant object is an object having a `next` method
which adheres to the iterator protocol.
As full iterator compliance is impossible to achieve without evaluating an
iterator, this function checks *only* for interface compliance.
In environments lacking Symbol.iterator support, this function always
returns `false`.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating whether value is iterable-like.
Examples
--------
> var bool = {{alias}}( [ 1, 2, 3 ] )
<boolean>
> bool = {{alias}}( {} )
false
> bool = {{alias}}( null )
false
See Also
--------