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

43 lines
1.0 KiB
Plaintext

{{alias}}( ...arr[, options] )
Generates array tuples from input arrays.
Parameters
----------
arr: ...Array
Input arrays to be zipped.
options: Object (optional)
Options.
options.trunc: boolean (optional)
Boolean indicating whether to truncate arrays longer than the shortest
input array. Default: `true`.
options.fill: any (optional)
Fill value used for arrays of unequal length. Default: `null`.
options.arrays: boolean (optional)
Boolean indicating whether an input array should be interpreted as an
array of arrays to be zipped. Default: `false`.
Returns
-------
out: Array
Array of arrays.
Examples
--------
// Basic usage:
> var out = {{alias}}( [ 1, 2 ], [ 'a', 'b' ] )
[ [ 1, 'a' ], [ 2, 'b' ] ]
// Turn off truncation:
> var opts = { 'trunc': false };
> out = {{alias}}( [ 1, 2, 3 ], [ 'a', 'b' ], opts )
[ [ 1, 'a' ], [ 2, 'b' ], [ 3, null ] ]
See Also
--------