Emoji Stripper TS is a lightweight, efficient Typescript library designed for removing emojis and emoticons from text. It's perfect for cleaning up user input, processing text for analysis, or any other situation where you need plain text free from graphical characters.
- Remove Emojis: Efficiently strips all Unicode emojis from text.
- Remove Emoticons: Option to also remove common emoticon patterns.
- Customizable: Easily configurable to suit your specific needs.
Install the package via npm:
npm install emoji-stripper-tes
Or using Yarn:
yarn add emoji-stripper-tes
Import and use the stripEmojis
function in your JavaScript project.
import stripEmojis from 'emoji-stripper-tes';
const options = {
removeEmojis: true,
removeEmoticons: true
};
const cleanedText = stripEmojis('Your text with emojis 😊 and emoticons :)', options);
console.log(cleanedText); // 'Your text with emojis and emoticons '
stripEmojis
function accepts the following options:
type StripOptions = {
removeEmojis: boolean; // Set true to remove emojis
removeEmoticons: boolean; // Set true to remove emoticons
};
Emoji Stripper TES uses regular expressions to identify and remove emoji and emoticon characters from the provided text string. By default, it removes all Unicode emojis and a predefined set of common emoticons.
Contributions to Emoji Stripper TES are welcome! Please read our contributing guidelines for more information.
This project is licensed under the MIT License - see the LICENSE file for details.