Skip to content
/ bytes.js Public
forked from hit9/bytes.js

Utf8 bytes from/to string for nodejs/iojs.

Notifications You must be signed in to change notification settings

xosi/bytes.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bytes.js

Utf8 bytes array from/to string.

Install

npm install bytes.js

Example

var bytes = require('bytes.js');

bytes.fromString('abc')  // [97, 98, 99]
bytes.toString([97, 98, 99])  // 'abc'
bytes.fromString('你好')  // [228, 189, 160, 229, 165, 189]
bytes.toString([228, 189, 160, 229, 165, 189])  // '你好'

License

MIT. Copyright (c) Chao Wang [email protected]

About

Utf8 bytes from/to string for nodejs/iojs.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%