Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

napi is missing method to create buffer from ArrayBuffer #54440

Copy link
Copy link
@ronag

Description

@ronag
Issue body actions

What is the problem this feature will solve?

Not possible to create Buffer from ArrayBuffer with napi

What is the feature you are proposing to solve the problem?

Add signature similar to what we have for typed arrays:

napi_status napi_create_typedarray(napi_env env,
                                   napi_typedarray_type type,
                                   size_t length,
                                   napi_value arraybuffer,
                                   size_t byte_offset,
                                   napi_value* result) 
napi_status napi_create_buffer(napi_env env,
                               size_t length,
                               napi_value arraybuffer,
                               size_t byte_offset,
                               napi_value* result) 

What alternatives have you considered?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.

    Type

    No type

    Projects

    Status

    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.