0.0.6 โ€ข Published 1 year ago

aesthetically v0.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year ago

Table of Contents

Demo

Check out the demo.

Installation

Using jsDelivr:

As an ES6 module:

<script type="module">
  import Aesthetically from "https://cdn.jsdelivr.net/npm/aesthetically@0/dist/aesthetically.js";
</script>

As a normal script:

<script src="https://cdn.jsdelivr.net/npm/aesthetically@0/dist/aesthetically.umd.js"></script>

Self-hosted:

As an ES6 module:

<script type="module">
  import Aesthetically from "/aesthetically.js";
</script>

As a normal script:

<script src="/aesthetically.umd.js"></script>

Using npm:

$ npm i aesthetically

In Node:

As an ES6 module:

import Aesthetically from "aesthetically";

As a CommonJS module:

const Aesthetically = require("aesthetically");

Usage

Getting a list of styles

If your looking for a list of styles, take a look at the table below

styles = Object.keys(Aesthetically.styles);

Styling test

Aesthetically.format("this is v cool", "double-struck");
// "this is v cool"

Arguments

text: (String) text to transform

style: (String) Style to transform text to

Returns

(String) formatted text

Un-styling text

Aesthetically.unformat("๐“น๐“ช๐“ฌ๐“ถ๐“ช๐“ท ๐“ฒ๐“ผ ๐“ฑ๐“พ๐“ท๐“ฐ๐“ป๐”‚ ๐Ÿ‘พ๐Ÿ”");
// "pacman is hungry ๐Ÿ‘พ๐Ÿ”"

Arguments

text: (String) text to transform

Returns

(String) unstyled text

Table of styles and support

Not all styles support all types of characters. Some only support lowercase or uppercase. Digits indicate support for 1 - 9 while zero is listed sperately if supported.

Mathematical Alphanumeric Symbols

StyleSupportSample
serf-boldupper, lower, digits, zero๐ฌ๐ฉ๐ก๐ข๐ง๐ฑ ๐จ๐Ÿ ๐›๐ฅ๐š๐œ๐ค ๐ช๐ฎ๐š๐ซ๐ญ๐ณ, ๐ฃ๐ฎ๐๐ ๐ž ๐ฆ๐ฒ ๐ฏ๐จ๐ฐ
serf-italicupper, lower๐‘ ๐‘โ„Ž๐‘–๐‘›๐‘ฅ ๐‘œ๐‘“ ๐‘๐‘™๐‘Ž๐‘๐‘˜ ๐‘ž๐‘ข๐‘Ž๐‘Ÿ๐‘ก๐‘ง, ๐‘—๐‘ข๐‘‘๐‘”๐‘’ ๐‘š๐‘ฆ ๐‘ฃ๐‘œ๐‘ค
serf-bold-italicupper, lower๐’”๐’‘๐’‰๐’Š๐’๐’™ ๐’๐’‡ ๐’ƒ๐’๐’‚๐’„๐’Œ ๐’’๐’–๐’‚๐’“๐’•๐’›, ๐’‹๐’–๐’…๐’ˆ๐’† ๐’Ž๐’š ๐’—๐’๐’˜
sans-serfupper, lower, digits, zero๐—Œ๐—‰๐—๐—‚๐—‡๐—‘ ๐—ˆ๐–ฟ ๐–ป๐—…๐–บ๐–ผ๐—„ ๐—Š๐—Ž๐–บ๐—‹๐—๐—“, ๐—ƒ๐—Ž๐–ฝ๐—€๐–พ ๐—†๐—’ ๐—๐—ˆ๐—
sans-serf-boldupper, lower, digits, zero๐˜€๐—ฝ๐—ต๐—ถ๐—ป๐˜… ๐—ผ๐—ณ ๐—ฏ๐—น๐—ฎ๐—ฐ๐—ธ ๐—พ๐˜‚๐—ฎ๐—ฟ๐˜๐˜‡, ๐—ท๐˜‚๐—ฑ๐—ด๐—ฒ ๐—บ๐˜† ๐˜ƒ๐—ผ๐˜„
sans-serf-italicupper, lower๐˜ด๐˜ฑ๐˜ฉ๐˜ช๐˜ฏ๐˜น ๐˜ฐ๐˜ง ๐˜ฃ๐˜ญ๐˜ข๐˜ค๐˜ฌ ๐˜ฒ๐˜ถ๐˜ข๐˜ณ๐˜ต๐˜ป, ๐˜ซ๐˜ถ๐˜ฅ๐˜จ๐˜ฆ ๐˜ฎ๐˜บ ๐˜ท๐˜ฐ๐˜ธ
sans-serf-bold-italicupper, lower๐™จ๐™ฅ๐™๐™ž๐™ฃ๐™ญ ๐™ค๐™› ๐™—๐™ก๐™–๐™˜๐™  ๐™ฆ๐™ช๐™–๐™ง๐™ฉ๐™ฏ, ๐™Ÿ๐™ช๐™™๐™œ๐™š ๐™ข๐™ฎ ๐™ซ๐™ค๐™ฌ
scriptupper, lower๐“ˆ๐“…๐’ฝ๐’พ๐“ƒ๐“ โ„ด๐’ป ๐’ท๐“๐’ถ๐’ธ๐“€ ๐“†๐“Š๐’ถ๐“‡๐“‰๐“, ๐’ฟ๐“Š๐’นโ„Šโ„ฏ ๐“‚๐“Ž ๐“‹โ„ด๐“Œ
script-boldupper, lower๐“ผ๐“น๐“ฑ๐“ฒ๐“ท๐” ๐“ธ๐“ฏ ๐“ซ๐“ต๐“ช๐“ฌ๐“ด ๐“บ๐“พ๐“ช๐“ป๐“ฝ๐”ƒ, ๐“ณ๐“พ๐“ญ๐“ฐ๐“ฎ ๐“ถ๐”‚ ๐“ฟ๐“ธ๐”€
frakturupper, lower๐”ฐ๐”ญ๐”ฅ๐”ฆ๐”ซ๐”ต ๐”ฌ๐”ฃ ๐”Ÿ๐”ฉ๐”ž๐” ๐”จ ๐”ฎ๐”ฒ๐”ž๐”ฏ๐”ฑ๐”ท, ๐”ง๐”ฒ๐”ก๐”ค๐”ข ๐”ช๐”ถ ๐”ณ๐”ฌ๐”ด
fraktur-boldupper, lower๐–˜๐–•๐–๐–Ž๐–“๐– ๐–”๐–‹ ๐–‡๐–‘๐–†๐–ˆ๐– ๐––๐–š๐–†๐–—๐–™๐–Ÿ, ๐–๐–š๐–‰๐–Œ๐–Š ๐–’๐–ž ๐–›๐–”๐–œ
monospaceupper, lower, digits, zero๐šœ๐š™๐š‘๐š’๐š—๐šก ๐š˜๐š ๐š‹๐š•๐šŠ๐šŒ๐š” ๐šš๐šž๐šŠ๐š›๐š๐šฃ, ๐š“๐šž๐š๐š๐šŽ ๐š–๐šข ๐šŸ๐š˜๐š 
double-struckupper, lower, digits, zero๐•ค๐•ก๐•™๐•š๐•Ÿ๐•ฉ ๐• ๐•— ๐•“๐•๐•’๐•”๐•œ ๐•ข๐•ฆ๐•’๐•ฃ๐•ฅ๐•ซ, ๐•›๐•ฆ๐••๐•˜๐•– ๐•ž๐•ช ๐•ง๐• ๐•จ

Enclosed Alphanumerics & Supplement

StyleSupportSample
circledupper, lower, digits, zeroโ“ขโ“Ÿโ“—โ“˜โ“โ“ง โ“žโ“• โ“‘โ“›โ“โ“’โ“š โ“ โ“คโ“โ“กโ“ฃโ“ฉ, โ“™โ“คโ““โ“–โ“” โ“œโ“จ โ“ฅโ“žโ“ฆ
negative-circledupper, zero๐Ÿ…ข๐Ÿ…Ÿ๐Ÿ…—๐Ÿ…˜๐Ÿ…๐Ÿ…ง ๐Ÿ…ž๐Ÿ…• ๐Ÿ…‘๐Ÿ…›๐Ÿ…๐Ÿ…’๐Ÿ…š ๐Ÿ… ๐Ÿ…ค๐Ÿ…๐Ÿ…ก๐Ÿ…ฃ๐Ÿ…ฉ, ๐Ÿ…™๐Ÿ…ค๐Ÿ…“๐Ÿ…–๐Ÿ…” ๐Ÿ…œ๐Ÿ…จ ๐Ÿ…ฅ๐Ÿ…ž๐Ÿ…ฆ
parenthesized-smalllower, digitsโ’ฎโ’ซโ’ฃโ’คโ’ฉโ’ณ โ’ชโ’ก โ’โ’งโ’œโ’žโ’ฆ โ’ฌโ’ฐโ’œโ’ญโ’ฏโ’ต, โ’ฅโ’ฐโ’Ÿโ’ขโ’  โ’จโ’ด โ’ฑโ’ชโ’ฒ
parenthesized-largeupper๐Ÿ„ข๐Ÿ„Ÿ๐Ÿ„—๐Ÿ„˜๐Ÿ„๐Ÿ„ง ๐Ÿ„ž๐Ÿ„• ๐Ÿ„‘๐Ÿ„›๐Ÿ„๐Ÿ„’๐Ÿ„š ๐Ÿ„ ๐Ÿ„ค๐Ÿ„๐Ÿ„ก๐Ÿ„ฃ๐Ÿ„ฉ, ๐Ÿ„™๐Ÿ„ค๐Ÿ„“๐Ÿ„–๐Ÿ„” ๐Ÿ„œ๐Ÿ„จ ๐Ÿ„ฅ๐Ÿ„ž๐Ÿ„ฆ
squaredupper๐Ÿ…‚๐Ÿ„ฟ๐Ÿ„ท๐Ÿ„ธ๐Ÿ„ฝ๐Ÿ…‡ ๐Ÿ„พ๐Ÿ„ต ๐Ÿ„ฑ๐Ÿ„ป๐Ÿ„ฐ๐Ÿ„ฒ๐Ÿ„บ ๐Ÿ…€๐Ÿ…„๐Ÿ„ฐ๐Ÿ…๐Ÿ…ƒ๐Ÿ…‰, ๐Ÿ„น๐Ÿ…„๐Ÿ„ณ๐Ÿ„ถ๐Ÿ„ด ๐Ÿ„ผ๐Ÿ…ˆ ๐Ÿ……๐Ÿ„พ๐Ÿ…†
negative-squaredupper๐Ÿ†‚๐Ÿ…ฟ๐Ÿ…ท๐Ÿ…ธ๐Ÿ…ฝ๐Ÿ†‡ ๐Ÿ…พ๐Ÿ…ต ๐Ÿ…ฑ๐Ÿ…ป๐Ÿ…ฐ๐Ÿ…ฒ๐Ÿ…บ ๐Ÿ†€๐Ÿ†„๐Ÿ…ฐ๐Ÿ†๐Ÿ†ƒ๐Ÿ†‰, ๐Ÿ…น๐Ÿ†„๐Ÿ…ณ๐Ÿ…ถ๐Ÿ…ด ๐Ÿ…ผ๐Ÿ†ˆ ๐Ÿ†…๐Ÿ…พ๐Ÿ††

Acknowledgements

This article and this other article were really useful for understanding the way Unicode strings work in JavaScript. The demo uses the awesome Bulma CSS framework <3.

License

MIT License

Copyright (c) 2020 Joshy Nosh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
0.0.6

1 year ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago