-
-
Notifications
You must be signed in to change notification settings - Fork 806
/
Copy pathrepl.txt
40 lines (30 loc) · 1.1 KB
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{alias}}( x, indices[, options] )
Takes elements from an array.
If `indices` is an empty array, the function returns an empty array.
Parameters
----------
x: Array|TypedArray|Object
Input array.
indices: ArrayLikeObject<integer>
List of element indices.
options: Object (optional)
Function options.
options.mode: string (optional)
Specifies how to handle an index outside the interval [0, max], where
`max` is the maximum possible array index. If equal to 'throw', the
function throws an error. If equal to 'normalize', the function throws
an error if provided an out-of-bounds normalized index. If equal to
'wrap', the function wraps around an index using modulo arithmetic. If
equal to 'clamp', the function sets an index to either 0 (minimum index)
or the maximum index. Default: 'normalize'.
Returns
-------
out: Array|TypedArray
Output array.
Examples
--------
> var x = [ 1, 2, 3, 4 ];
> var y = {{alias}}( x, [ 1, 3 ] )
[ 2, 4 ]
See Also
--------