@stdlib/array
Version:
Arrays.
33 lines (23 loc) • 676 B
Plain Text
{{alias}}( x, s, strict )
Returns a shallow copy of a portion of an array.
If provided an array-like object having an unknown data type, the function
copies input array elements to a new generic array.
Parameters
----------
x: ArrayLikeObject
Input array.
s: Slice
Slice object.
strict: boolean
Boolean indicating whether to enforce strict bounds checking.
Returns
-------
out: Array|TypedArray|Object
Output array.
Examples
--------
> var s = new {{alias: /slice/ctor}}( 1, 3 );
> var out = {{alias}}( [ 1, 2, 3, 4 ], s, false )
[ 2, 3 ]
See Also
--------