Skip to content

kevlened/utf8-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🎱 isomorphic utf8 library in 113 bytes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published