Skip to content
A simple application using svelte 3.0, that encodes/decodes ASCII text or hex strings to/from base64 and provides reactive ui components to help illustrate the encoding process.
JavaScript HTML CSS
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
.vscode
cypress
public
src
.eslintrc
.gitattributes
.gitignore
.prettierignore
.prettierrc
README.md
cypress.json
package-lock.json
package.json
rollup.config.js

README.md

svelte-base64

This is a simple application that encodes/decodes ASCII text or hex strings to/from base64 and provides reactive UI components to help illustrate the encoding process. You can easily view and fork this project on codesandbox:

Edit svelte-base64

Base64 Encoder/Decoder

  • Input/output strings displayed in hex, decimal, binary, and base64 to demonstrate how input bytes are encoded to base64
  • Mouseover/touch any part of the Hex/Base64 output to highlight all related bit groups and the matching base64/ASCII characters in the Lookup Tables
  • Hex strings must contain only numbers and/or upper and lowercase hex digits (a-f, A-F, 0-9)
  • Hex strings can be prefixed by "0x", but this is not required (e.g., 0xFE and FE both represent the value 254 and both will produce the same output when encoded to base64)
  • Encoded strings must be valid base64 (standard) or base64url (url/filename safe) values

CSS Preprocessing

Rollup & Plugins Config

  • Configured to process and minify SASS/SCSS files and copy topublic/build folder (node-sass, postcss/cssnano)
  • Configured to copy FA font files from node_modules folder and copy to public folder
  • Configured to minify entire bundle when building for production
  • resolve, commonjs, and terser rollup plugins configured

Tests

  • Cypress E2E tests created for basic encode/decode scenarios
  • 1/5 test cases is failing due to bug that can not be reproduced outside of Cypress
  • 5 test cases are each executed with 4 different screen types/orientations
  • Input and expected output for both ASCII and Hex strings taken directly from the Examples and Illustrations and Test Vectors sections of RFC4648 which is the original specification for Base64 and other print-safe binary encodings

Please leave any feedback by logging an issue, especially bugs! Thanks.

You can’t perform that action at this time.