Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

convert-string

cryptocoinjs276k0.1.0TypeScript support: definitely-typed

Convert to/from strings and array of bytes

string, strings, convert, hex, bytes

readme

convert-string

JavaScript component to convert to/from strings and byte arrays.

AMD/CommonJS compatible.

Install

Node.js/Browserify

npm install --save convert-string

Component

component install cryptocoin/convert-string

Bower

bower install convert-string

Script

<script src="/path/to/convert-string.js"></script>

Usage

stringToBytes(str)

bytesToString(bytes)

UTF8.stringToBytes(str)

UTF8.bytesToString(bytes)

Credits

Loosely inspired by code from here: https://github.com/vbuterin/bitcoinjs-lib & CryptoJS

References on JavaScript UTF-8 forced encoding

(these sources are also included as PDFs in the repo in case the links go dead)

License

(MIT License)

Copyright 2013, JP Richardson jprichardson@gmail.com

changelog

0.1.0 / 2013-11-20

  • changed package name from cryptocoin-convert-string to convert-string.
  • removed AMD support

0.0.1 / 2013-11-03

  • initial release