buffer-to-arraybuffer

WebJar for buffer-to-arraybuffer

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

buffer-to-arraybuffer
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

buffer-to-arraybuffer
WebJar for buffer-to-arraybuffer
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/miguelmota/buffer-to-arraybuffer

Download buffer-to-arraybuffer

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/buffer-to-arraybuffer/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>buffer-to-arraybuffer</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-to-arraybuffer/
implementation 'org.webjars.npm:buffer-to-arraybuffer:0.0.5'
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-to-arraybuffer/
implementation ("org.webjars.npm:buffer-to-arraybuffer:0.0.5")
'org.webjars.npm:buffer-to-arraybuffer:jar:0.0.5'
<dependency org="org.webjars.npm" name="buffer-to-arraybuffer" rev="0.0.5">
  <artifact name="buffer-to-arraybuffer" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='buffer-to-arraybuffer', version='0.0.5')
)
libraryDependencies += "org.webjars.npm" % "buffer-to-arraybuffer" % "0.0.5"
[org.webjars.npm/buffer-to-arraybuffer "0.0.5"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

buffer-to-arraybuffer

Convert Buffer to ArrayBuffer

Install

npm install buffer-to-arraybuffer

Usage

var bufferToArrayBuffer = require('buffer-to-arraybuffer');

var b = new Buffer(12);
b.write('abc', 0);

var ab = bufferToArrayBuffer(b);
String.fromCharCode.apply(null, new Uint8Array(ab)); // 'abc'

NOTE: If you only target node v4.3+, you can simply just do:

new Buffer([12]).buffer

License

MIT

Versions

Version
0.0.5