Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
/ base64-emoji Public archive

ES6 base64 implementation that can use emoji

Notifications You must be signed in to change notification settings

jacob-swanson/base64-emoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base64-emoji

ES6 base64 implementation that can use unicode (targeted towards emoji)

Installation:

npm install --save @jacob-swanson/base64-emoji

Sample code:

import Base64 from '@jacob-swanson/base64-emoji';

let base64 = new Base64();
console.log(base64.encode('abcdefg')); // YWJjZGVmZz==
console.log(base64.decode('YWJjZGVmZz==')); // abcdefg

let emoji64 = new Base64(Base64.emojiCodes, Base64.emojiCodeSize);
console.log(emoji64.encode('abcdefg')); // 😘😖😉😣😙😆😕😦😙😳🙀🙀
console.log(emoji64.decode('😘😖😉😣😙😆😕😦😙😳🙀🙀')); // abcdefg

The set of codes can be any set of 65 characters of the same size.

About

ES6 base64 implementation that can use emoji

Resources

Stars

Watchers

Forks

Packages

No packages published