Skip to content

tycrek/base2048-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base2048-worker

This is the source code to base2048-worker, a Cloudflare Worker that will encode or decode the provided input to Base2048.

Examples

A Base2048 encode for Hello, world! looks like this ԋϠɲණరѻఋԵړƶ (link).
Decoding the result of ԋϠɲණరѻఋԵړƶ returns to Hello, world! (link).

Usage

You are free to use this service however you like. Example JavaScript:

const url = 'https://base2048.tycrek.dev/encode/Hello,%20world!';

fetch(url)
  .then(response => {
    if (!response.ok)
      throw new Error(`Response not ok: ${response.statusText}`);
    return response.text();
  })
  .then(data => console.log(data)) // ԋϠɲණరѻఋԵړƶ
  .catch(error => console.error('Fetch error:', error));

License

Licensed under ISC

Copyright (c) 2023 tycrek