u8a
v1.0.0
Published
a collection of functions for working with Uint8Array representations of strings
Downloads
245
Readme
u8a
A collection of functions for working with Uint8Array representations of strings.
Install
$ npm install u8a
Usage
var u8a = require('u8a/from-string')
var str = require('u8a/to-string')
var hex = require('u8a/to-hex')
console.log(u8a('hello'))
// => [104, 101, 108, 108, 111]
console.log(str(u8a('hello')))
// => 'hello'
console.log(hex(u8a('hello world')))
// => '68656c6c6f'
Page weight (all combined)
| compression | size | | :------------ | ------: | | u8a.js | 1.51 kB | | u8a.min.js | 1.08 kB | | u8a.min.js.gz | 525 B |
License
Public domain. No warranty.