time-to-botec/squiggle/node_modules/@stdlib/utils/some/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

33 lines
828 B
Plaintext

{{alias}}( collection, n )
Tests whether at least `n` elements in a collection are truthy.
The function immediately returns upon finding `n` truthy elements.
If provided an empty collection, the function returns `false`.
Parameters
----------
collection: Array|TypedArray|Object
Input collection over which to iterate. If provided an object, the
object must be array-like (excluding strings and functions).
n: number
Minimum number of truthy elements.
Returns
-------
bool: boolean
The function returns `true` if a collection contains at least `n` truthy
elements; otherwise, the function returns `false`.
Examples
--------
> var arr = [ 0, 0, 1, 2, 3 ];
> var bool = {{alias}}( arr, 3 )
true
See Also
--------