-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
92 lines (68 loc) · 1.84 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{{alias}}( size )
Returns an array buffer having a specified number of bytes.
Buffer contents are initialized to 0.
Parameters
----------
size: integer
Number of bytes.
Returns
-------
out: ArrayBuffer
An array buffer.
Examples
--------
> var buf = new {{alias}}( 5 )
<ArrayBuffer>
{{alias}}.length
Number of input arguments the constructor accepts.
Examples
--------
> {{alias}}.length
1
{{alias}}.isView( arr )
Returns a boolean indicating if provided an array buffer view.
Parameters
----------
arr: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating if an input argument is a buffer view.
Examples
--------
> var arr = new {{alias:@stdlib/array/float64}}( 10 );
> {{alias}}.isView( arr )
true
{{alias}}.prototype.byteLength
Read-only property which returns the length (in bytes) of the array buffer.
Examples
--------
> var buf = new {{alias}}( 5 );
> buf.byteLength
5
{{alias}}.prototype.slice( [start[, end]] )
Copies the bytes of an array buffer to a new array buffer.
Parameters
----------
start: integer (optional)
Index at which to start copying buffer contents (inclusive). If
negative, the index is relative to the end of the buffer.
end: integer (optional)
Index at which to stop copying buffer contents (exclusive). If negative,
the index is relative to the end of the buffer.
Returns
-------
out: ArrayBuffer
A new array buffer whose contents have been copied from the calling
array buffer.
Examples
--------
> var b1 = new {{alias}}( 10 );
> var b2 = b1.slice( 2, 6 );
> var bool = ( b1 === b2 )
false
> b2.byteLength
4
See Also
--------