Skip to content

Commit ce16c60

Browse files
Create toArray.md
1 parent ea84841 commit ce16c60

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/reference/buffer/toArray.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## toArray
2+
Read the buffer's content as an array in specificed format and with a value.
3+
4+
## Returns
5+
an array of bytes in specific format and value.
6+
7+
## Example
8+
Get a buffer that has 20 bytes and value.
9+
``` ts
10+
const buf = Buffer.create(20);
11+
buf.toArray(); // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12+
```

0 commit comments

Comments
 (0)