utf8-lite
isomorphic utf8 library in 113 bytes
Last updated 3 years ago by kevlened .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install utf8-lite 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.3.0                                ...           latest (3 years ago)

8 Versions

  • 1.3.0                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |