Public
Edited
Mar 20, 2023
Fork of Base64
22 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function remap(alphabet) {
return htl.html`${replace(input, alphabet)}`;
}
Insert cell
function reverse(text) {
return [...text].reverse().join("");
}
Insert cell
function replace(source, alphabet) {
const chars = [...alphabet];
const A = 65, a = 97;
return source.replace(/[a-zA-Z]/g, char => {
const c = char.charCodeAt(0);
const i = (c - (c >= a ? a : A)) + (c >= a ? 0 : 26);
return chars[i];
});
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more