convert-string-bytes
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

convert-string-bytes

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

Install

Node.js/Browserify

npm install --save convert-string

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)

/convert-string-bytes/

    Package Sidebar

    Install

    npm i convert-string-bytes

    Weekly Downloads

    72

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    3.84 kB

    Total Files

    5

    Last publish

    Collaborators

    • mkchung