1.0.0 • Published 8 years ago

u8a v1.0.0

Weekly downloads
27
License
MIT
Repository
github
Last release
8 years ago

u8a

A collection of functions for working with Uint8Array representations of strings.

Build status

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)

compressionsize
u8a.js1.51 kB
u8a.min.js1.08 kB
u8a.min.js.gz525 B

License

Public domain. No warranty.