Buffer.copy

Create a copy of the given buffer. This will also make a newly allocated copy of the data the source buffer contains.

class Buffer
copy
()

Return Value

Type: Buffer

a new copy of buf. [transfer full]

Meta