🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

decode-utf8

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decode-utf8

Turn an ArrayBuffer or Uint8Array of UTF8 data into a string.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Decode UTF8

Turn an ArrayBuffer or Uint8Array of UTF8 data into a string.

Installation

npm install --save decode-uf8

Usage

const decodeUtf8 = require('decode-utf8')

console.log(decodeUtf8(Uint8Array.of(72, 101, 108, /* ... */ 108, 100, 33)))
//=> Hello, World!

console.log(decodeUtf8(Uint8Array.of(240, 159, 144, /* ... */ 159, 153, 138)))
//=> 🐵 🙈 🙉 🙊

API

decodeUtf8(input: ArrayBuffer | Uint8Array): string

Returns a string representing the input data interpreted as UTF8.

FAQs

Package last updated on 30 Jan 2018

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