Socket
Socket
Sign inDemoInstall

typedarray-to-buffer

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedarray-to-buffer

Convert a typed array to a Buffer without a copy


Version published
Maintainers
1
Created

What is typedarray-to-buffer?

The typedarray-to-buffer npm package is a simple utility that converts a TypedArray or ArrayBuffer to a Node.js Buffer without copying the underlying memory. It's particularly useful when you need to work with Node.js buffers but are starting with a TypedArray (like Uint8Array) or an ArrayBuffer that you've obtained from a different context, such as the Web API or another library that doesn't use Node.js buffers.

What are typedarray-to-buffer's main functionalities?

Convert TypedArray to Buffer

This feature allows you to convert a TypedArray, such as Uint8Array, to a Node.js Buffer instance. The conversion is done without copying the data, making it a fast operation.

var toBuffer = require('typedarray-to-buffer');
var uint8array = new Uint8Array([1, 2, 3]);
var buffer = toBuffer(uint8array);

Other packages similar to typedarray-to-buffer

Keywords

FAQs

Package last updated on 23 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc