stringstonumbers
TypeScript icon, indicating that this package has built-in type declarations

5.1.0 • Public • Published

stringstonumbers

Now in TypeScript!

stringstonumbers is a very simple npm package that converts any string input into a number and back. It was created to be used with the scratch-api module for transferring data over scratch cloud servers.

How to use

With npm

npm install stringstonumbers

Importing

const strToNum = require("stringstonumbers");

HTML

Want to use the script in the browser? No problem! Just import the script!
<script
  type="application/javascript"
  src="https://cdn.jsdelivr.net/npm/stringstonumbers@5/dist/browser.js"
></script>

Encoding

strToNum.encode("Hello World!");
// returns "07303737409122404337296200"

Decoding

strToNum.decode("07303737409122404337296200");
// returns "Hello World!"

Package Sidebar

Install

npm i stringstonumbers

Weekly Downloads

3

Version

5.1.0

License

GNU

Unpacked Size

41.1 kB

Total Files

9

Last publish

Collaborators

  • errorgamer2000