Skip to content

Encode/Decode strings to Base62 strings. Useful to convert any string to an encoded string that only contains letters and numbers.

License

Notifications You must be signed in to change notification settings

felipecarrillo100/base62str

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base62str

Encode/Decode strings to Base62 strings. Useful to convert any string to an encoded string that only contains letters and numbers.

How to install:

npm install base62str

How to include

import Base62Str from "base62str";

If you want to use the library in nodejs then use require as follows:

const Base62Str = require("base62str").default;

To use

Create an instance

First create an instance:

  const base62 = Base62Str.createInstance();  

If you prefer you can create an instance with inverted CharacterSet:

  const base62 = Base62Str.createInstanceWithInvertedCharacterSet();

Encoding:

   const encodedString = base62.encodeStr("Hello World!");
   // encodedString => T8dgcjRGkZ3aysdN

Decoding:

   const decodedString = base62.decodeStr(encodedString);
   // decodedString => Hello World!

Donations

Creating these libraries is my hobie. If you consider my work useful to you, please consider buying me a coffee. Your contribution keeps me motivated to created and maintain these useful libraries.

paypal

QR

About

Encode/Decode strings to Base62 strings. Useful to convert any string to an encoded string that only contains letters and numbers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published