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

utf8-lite

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utf8-lite

isomorphic utf8 library in 113 bytes

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

utf8-lite NPM Build

isomorphic utf8 library in 113 bytes

Install

npm install utf8-lite

Usage

const utf8 = require('utf8-lite')

utf8.toUtf8('hello 你好')
// hello \xE4\xBD\xA0\xE5\xA5\xBD

utf8.fromUtf8('hello \xE4\xBD\xA0\xE5\xA5\xBD')
// hello 你好

Can it be smaller?

If you use ES6 imports with a bundler that supports tree-shaking, yes!

import { toUtf8 } from 'utf8-lite'

License

MIT

Keywords

utf-8

FAQs

Package last updated on 09 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