time-to-botec/squiggle/node_modules/@stdlib/assert/is-generator-object/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

36 lines
644 B
Plaintext

{{alias}}( value )
Tests if a value is a generator object.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating whether value is a generator object.
Examples
--------
> function* generateID() {
... var idx = 0;
... while ( idx < idx+1 ) {
... yield idx;
... idx += 1;
... }
... };
> var bool = {{alias}}( generateID() )
true
> bool = {{alias}}( generateID )
false
> bool = {{alias}}( {} )
false
> bool = {{alias}}( null )
false
See Also
--------