Skip to content

Wrong type declaration for copy #3

@mietek

Description

@mietek

The type declaration for copy is wrong:

copy :: Offset -> Offset -> Buffer -> Offset -> Buffer -> Buffer

Buffer.copy modifies the target buffer and returns the number of octets copied:

> var b1 = new Buffer("foo");
undefined
> var b2 = new Buffer("BARBAZ");
undefined
> b1.copy(b2, 2, 0, 3);
3
> b2.toString();
'BAfooZ'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions