text-flipper
v0.1.0
Published
A Node.js package to flip strings upside down using Unicode characters.
Readme
text-flipper
A simple Node.js package to flip text strings upside down (e.g., "table flip" style) using provided Unicode characters.
Installation
npm install text-flipperUsage
Import the flipText function and pass the string you wish to flip to it.
Node.js Example
Create a file named example.js:
const flipText = require('text-flipper');
const originalText = "Hello World! This is an example: 123 :)";
const flippedText = flipText(originalText);
console.log(`Original: ${originalText}`);
console.log(`Flipped: ${flippedText}`);
// Flipped: (: ƐᄅƖ :ǝldɯɐxǝ uɐ sᴉ sᴉɥ┴ ¡plɹoM ollǝHRun with:
node test.jsCharacter Mapping
The package uses the following mapping and reversal logic:
Every character in the input string is replaced with its upside-down Unicode equivalent (as defined in the user-provided table). Unmapped characters remain unchanged.
The entire sequence of characters is reversed to complete the "flipped" effect.
Supported Characters
The package supports uppercase and lowercase Latin letters, numbers, and a selection of punctuation and mathematical symbols, based on the provided Unicode mapping table.
LICENSE
MIT
