Use emoji-regex
to Strip emoji from a string in Node.js and browsers.
var emoji
emoji = 'thumbs-up👍 for staying strong💪 without emoji please🙏'
console.log(emojiStrip(emoji))
// => "thumbs-up for staying strong without emoji please"
emoji = 'dealing with emoji😡 makes me feel like poop💩'
console.log(emojiStrip(emoji))
// => "dealing with emoji makes me feel like poop"
Returns a copy of string
with any emoji characters removed.
The emojiStrip
function uses
the emoji-regex
package
behind the scenes.
It can remove any of the emoji supported by that package.
Currently, it supports all emoji up to Unicode Version 10 except for emoji sequences.
Install with npm:
npm install --save emoji-strip
Require it in your program:
var emojiStrip = require('emoji-strip')
Download one of the versions of emoji-strip.js
:
- emoji-strip.js (uncompressed)
- emoji-strip.min.js (minified)
Link it in your HTML:
<script src="emoji-strip.min.js"></script>
ISC