weird-to-normal-chars
TypeScript icon, indicating that this package has built-in type declarations

1.8.3 • Public • Published

Weird to normal chars converter

Coverage Status Maintainability npm Donate

NPM

Library to detect weird characters in a string and convert them to normal chars. This project was born to convert biographies in social medias that are sometimes written using weird special characters and fonts, 🄻🄸🄺🄴 ⓣⓗⓘⓢ 🅾🅽🅴.

I mostly used instafonts.io to find the weird chars.

Install

npm i weird-to-normal-chars

Example

const { weirdToNormalChars } = require('weird-to-normal-chars');

const result1 = weirdToNormalChars('𝔗𝔥𝔦𝔰 𝔦𝔰 𝔞 𝔴𝔢𝔦𝔯𝔡 𝔰𝔱𝔯𝔦𝔫𝔤');
const result2 = weirdToNormalChars('𝒯𝒽𝒾𝓈 𝒾𝓈 𝒶 𝓌𝑒𝒾𝓇𝒹 𝓈𝓉𝓇𝒾𝓃𝑔');
const result3 = weirdToNormalChars('𝕋𝕙𝕚𝕤 𝕚𝕤 𝕒 𝕨𝕖𝕚𝕣𝕕 𝕤𝕥𝕣𝕚𝕟𝕘');
console.log(result1); // This is a weird string
console.log(result2); // This is a weird string
console.log(result3); // This is a weird string

Run tests

npm test

Run lint

npm run lint

I need you

To support as many chars as possible I need your help. If you have a list of chars that are not covered already, please open an Issue or open a Pull Request.

Author

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.8.3149latest

Version History

VersionDownloads (Last 7 Days)Published
1.8.3149
1.8.21
1.8.10
1.8.09
1.7.00
1.6.00
1.5.10
1.5.00
1.4.00
1.3.00
1.2.00
1.1.20
1.1.00
1.0.01

Package Sidebar

Install

npm i weird-to-normal-chars

Weekly Downloads

153

Version

1.8.3

License

MIT

Unpacked Size

36.6 kB

Total Files

12

Last publish

Collaborators

  • davideviolante