Socket
Socket
Sign inDemoInstall

emoji-strip

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    emoji-strip

Strip emoji from a string in Node.js and browsers.


Version published
Maintainers
1
Install size
51.7 kB
Created

Readme

Source

emoji-strip

Use emoji-regex to Strip emoji from a string in Node.js and browsers.

Examples

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"

API

emojiStrip(string)

Returns a copy of string with any emoji characters removed.

Supported emoji

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

For Node.js

Install with npm:

npm install --save emoji-strip

Require it in your program:

var emojiStrip = require('emoji-strip')

For browsers

Download one of the versions of emoji-strip.js:

Link it in your HTML:

<script src="emoji-strip.min.js"></script>

License

ISC

Keywords

FAQs

Last updated on 10 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc