1.2.0 • Published 3 years ago

js-string-cleaner v1.2.0

Weekly downloads
222
License
ISC
Repository
github
Last release
3 years ago

A simple npm module to replace special characters in a string with unicode letters.

🏠 Homepage

Install

npm i js-string-cleaner

Usage

The module has only one function that takes as parameter a string and an optionnal object. By default, each character will simply be replaced by its corresponding letter, which can lead to mixtures of lower and upper case letters. If a character is not recognized, it is left as it is. To get a formatted string, with only the first letter of each word in uppercase or only the first character of the sentence in uppercase, use parameters capitalizeAllWords or capitalizeFirstLetter.

const clean = require('js-string-cleaner');

const txt = 'sιмση ℓεcℓεяε#5765';

clean(txt); // simon leclere#5765

clean(txt, { capitalizeFirstLetter: true }); // Simon leclere#5765

clean(txt, { capitalizeAllWords: true }); // Simon Leclere#5765

Author

👤 Simon Leclère

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page. PS: If you want to add new characters, don't hesitate to make a pull request or to contact me on Discord : sιмση ℓεcℓεяε#5765.

Build it yourself

npm run test
npm run format
npm run lint
npm run build

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Simon Leclère. This project is ISC licensed.


This README was generated with ❤️ by readme-md-generator

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago