New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

topgun-textencoder

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

topgun-textencoder

An isomorphic encode/decode Uint8Arrays to strings for Javascript in Node and the browser

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
4
-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

✨ topgun-textencoder

An isomorphic TextEncoder for Javascript in Node and the browser, used in TopGun

semantic-release npm bundlephobia License: MIT

What?

Encode/decode Uint8Arrays to strings.

This is just a thin wrapper that provides an isomorphic API.

  • To perform UTF8 conversion in the browser it uses the native TextEncoder.
  • In Node it uses Buffer and Uint8Array.

Install

npm install topgun-textencoder

Usage

const textencoder = require('topgun-textencoder')
// or
import textencoder from 'topgun-textencoder';

textencoder.encode('Hello') // Uint8Array [ 72, 101, 108, 108, 111 ]

License

MIT

Keywords

isomoprhic

FAQs

Package last updated on 10 Jun 2023

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