emoji-remover
v1.0.1
Published
Remove emojis from any string or text.
Maintainers
Readme
Emoji Stripper / Remover
Description
This Node.js package removes all emojis from a given text string using Unicode regex, with built-in error handling and no external dependencies.
Installation
npm install emoji-removerUsage
const emojiStripper = require('emoji-remover');
const textWithEmojis = 'Hello 😊, how are you? 🤔';
const cleanText = emojiStripper.stripEmojis(textWithEmojis);
console.log(cleanText); // Output: "Hello , how are you? "Functions
stripEmojis(text)- Removes all emojis from the input string.- Parameters:
text(string) - The input text. - Returns: A string with all emojis removed.
- Parameters:
Error Handling
- Throws a
TypeErrorif the input is not a string. - Logs errors and returns the original text if an exception occurs.
License
This project is licensed under the MIT License.
