Skip to content

micahlt/string2num

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

string2num

string2num is a super-simple npm package for encoding strings into integers and decoding them.

Usage

Importing

const s2n = require('string2num');

Encoding

s2n.encode('hello world!')
// returns 080512121500231518120439 as a string

Decoding

s2n.decode('080512121500231518120439')
// returns 080512121500231518120439

Other notes

string2num was specifically designed to allow Scratch users to communicate with servers and between clients using number-restrcited cloud variables. If you are using this in the context of Scratch, download the charmap array here or if you're looking for a simplified approach, just remix the existing project and go from there.

About

Simply transform strings into numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages