1.8.3 β€’ Published 2 years ago

weird-to-normal-chars v1.8.3

Weekly downloads
89
License
MIT
Repository
github
Last release
2 years ago

Weird to normal chars converter

npm.io 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

1.8.3

2 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.1

3 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.0

5 years ago

1.0.0

5 years ago