Socket
Socket
Sign inDemoInstall

convert-string

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    convert-string

Convert to/from strings and array of bytes


Version published
Weekly downloads
56K
decreased by-13.97%
Maintainers
1
Install size
3.91 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 21 Nov 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc