Icard/angular-clarity-master(work.../node_modules/encode-utf8
realSnehal 400e0876de frontend 2024-07-16 20:25:36 +05:30
..
index.d.ts frontend 2024-07-16 20:25:36 +05:30
index.js frontend 2024-07-16 20:25:36 +05:30
package.json frontend 2024-07-16 20:25:36 +05:30
readme.md frontend 2024-07-16 20:25:36 +05:30
test.js frontend 2024-07-16 20:25:36 +05:30

readme.md

Encode UTF8

Turn a string into an ArrayBuffer by using the UTF8 encoding.

Installation

npm install --save encode-uf8

Usage

const encodeUtf8 = require('encode-utf8')

console.log(encodeUtf8('Hello, World!'))
//=> ArrayBuffer { byteLength: 13 }

console.log(encodeUtf8('🐵 🙈 🙉 🙊'))
//=> ArrayBuffer { byteLength: 19 }

API

encodeUtf8(input: string): ArrayBuffer

Returns an ArrayBuffer with the string represented as UTF8 encoded data.