🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

array-buffer-from-string

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-buffer-from-string

Create an ArrayBuffer with the [raw bytes][javascript-encoding] from a String.

0.1.0
latest
Source
npm
Version published
Weekly downloads
2.3K
276.86%
Maintainers
1
Weekly downloads
 
Created
Source

ArrayBuffer from String

Create an ArrayBuffer with the raw bytes from a String.

Installation

npm install --save array-buffer-from-string

Usage

const arrayBufferFromString = require('array-buffer-from-string')

console.log(arrayBufferFromString('Hello world!'))
//=> ArrayBuffer { byteLength: 24 }

API

arrayBufferFromString(input: string) => ArrayBuffer

Create an ArrayBuffer with the raw bytes from a String.

See also

hex-to-array-buffer - Turn a string of hexadecimal characters into an ArrayBuffer

FAQs

Package last updated on 15 Aug 2016

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