-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepl.txt
74 lines (54 loc) · 1.64 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
{{alias}}( buffer[, byteOffset[, byteLength]] )
Returns a data view representing a provided array buffer.
Parameters
----------
buffer: ArrayBuffer|SharedArrayBuffer
Array buffer.
byteOffset: integer (optional)
Offset (in bytes) to the first byte in the array buffer for the new view
to reference. Default: 0.
byteLength: integer (optional)
Number of elements in the byte array. If not provided, the view's length
will equal the buffer's length.
Returns
-------
out: DataView
A data view.
Examples
--------
> var buf = new {{alias:@stdlib/array/buffer}}( 5 )
<ArrayBuffer>
> var dv = new {{alias}}( buf )
<DataView>
{{alias}}.prototype.buffer
Read-only property which returns the underyling array buffer.
Examples
--------
> var buf1 = new {{alias:@stdlib/array/buffer}}( 5 );
> var dv = new {{alias}}( buf1 );
> var buf2 = dv.buffer
<ArrayBuffer>
> var b = ( buf1 === buf2 )
true
{{alias}}.prototype.byteLength
Read-only property which returns the length (in bytes) of the view.
Examples
--------
> var buf = new {{alias:@stdlib/array/buffer}}( 5 );
> var dv = new {{alias}}( buf );
> dv.byteLength
5
{{alias}}.prototype.byteOffset
Read-only property which returns the offset (in bytes) of the view to the
start of the underlying array buffer.
Examples
--------
> var buf = new {{alias:@stdlib/array/buffer}}( 5 );
> var dv = new {{alias}}( buf, 2 );
> dv.byteLength
3
> dv.byteOffset
2
TODO: document properties/methods
See Also
--------