Socket
Socket
Sign inDemoInstall

array-buffer-from-string

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
543
decreased by-27.7%
Maintainers
1
Install size
3.12 kB
Created
Weekly downloads
 

Readme

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

Last updated on 15 Aug 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc