Skip to content

A node package to convert any string input into a number and back. Created to be used with the scratch-api module for transferring data over scratch cloud servers.

License

Notifications You must be signed in to change notification settings

nexensys/stringstonumbers

Repository files navigation

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!"

About

A node package to convert any string input into a number and back. Created to be used with the scratch-api module for transferring data over scratch cloud servers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published