-
-
Notifications
You must be signed in to change notification settings - Fork 805
/
Copy pathrepl.txt
91 lines (64 loc) · 1.41 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
{{alias}}
Buffer constructor.
{{alias}}( size )
Allocates a buffer having a specified number of bytes.
Parameters
----------
size: integer
Number of bytes to allocate.
Returns
-------
out: Buffer
Buffer instance.
Examples
--------
> var b = new {{alias}}( 4 )
<Buffer>
{{alias}}( buffer )
Copies buffer data to a new Buffer instance.
Parameters
----------
buffer: Buffer
Buffer to copy from.
Returns
-------
out: Buffer
Buffer instance.
Examples
--------
> var b1 = new {{alias}}( [ 1, 2, 3, 4 ] );
> var b2 = new {{alias}}( b1 )
<Buffer>[ 1, 2, 3, 4 ]
{{alias}}( array )
Allocates a buffer using an array of octets.
Parameters
----------
array: Array
Array of octets.
Returns
-------
out: Buffer
Buffer instance.
Examples
--------
> var b = new {{alias}}( [ 1, 2, 3, 4 ] )
<Buffer>[ 1, 2, 3, 4 ]
{{alias}}( str[, encoding] )
Allocates a buffer containing a provided string.
Parameters
----------
str: string
Input string.
encoding: string (optional)
Character encoding. Default: 'utf8'.
Returns
-------
out: Buffer
Buffer instance.
Examples
--------
> var b = new {{alias}}( 'beep boop' )
<Buffer>
TODO: add methods and properties
See Also
--------