Socket
Socket
Sign inDemoInstall

emoji-aware

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-aware - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

.nyc_output/09bbf93ab8dfca2a3dce036db928eda1.json

16

package.json
{
"name": "emoji-aware",
"version": "3.0.1",
"version": "3.0.2",
"description": "Emoji-aware unicode string utilities",

@@ -20,3 +20,3 @@ "main": "emoji-aware.js",

"lodash.flattendeep": "^4.4.0",
"parsimmon": "^1.0.0"
"parsimmon": "^1.6.2"
},

@@ -27,9 +27,9 @@ "directories": {

"devDependencies": {
"ava": "^0.17.0",
"benchmark": "^2.1.2",
"cheerio": "^0.22.0",
"ava": "^0.22.0",
"benchmark": "^2.1.4",
"cheerio": "^1.0.0-rc.2",
"codecov.io": "^0.1.6",
"emojilib": "^2.0.2",
"nyc": "^9.0.1",
"request": "^2.78.0"
"emojilib": "^2.2.9",
"nyc": "^11.2.1",
"request": "^2.83.0"
},

@@ -36,0 +36,0 @@ "repository": {

@@ -8,3 +8,3 @@ 'use strict';

exports.OptionalVariationSelector = Parsimmon.regex(/[\uFE0E\uFE0F]{0,1}/)
.desc('an optional variation selector (\\uFE0E or \\uFE0F)');
.desc('an optional variation selector (\\uFE0E or \\uFE0F)');

@@ -26,3 +26,3 @@ var KeycapEmoji = Parsimmon.seq(

Parsimmon.regex(/(\uD83C[\uDFFB-\uDFFF]){0,1}/)
.desc('an optional Fitzpatrick modifier');
.desc('an optional Fitzpatrick modifier');

@@ -60,2 +60,3 @@ var SimpleEmoji = Parsimmon.alt(

SimpleEmoji,
OptionalFitzpatrickModifier,
OptionalVariationSelector

@@ -62,0 +63,0 @@ ),

@@ -35,4 +35,10 @@ [![travis]](http://travis-ci.org/beaugunderson/emoji-aware)

### Example
## API
### `split`
Split a string but keep emoji intact.
#### Example
```js

@@ -51,1 +57,27 @@ var split = require('emoji-aware').split;

![a screenshot of the output](http://i.imgur.com/Gdgsik5.png)
### `onlyEmoji`
Returns only the emoji contained in the string.
#### Example
```js
var onlyEmoji = require('emoji-aware').onlyEmoji;
onlyEmoji('testing😸');
// ['😸']
```
### `withoutEmoji`
Returns only the non-emoji contained in the string.
#### Example
```js
var withoutEmoji = require('emoji-aware').withoutEmoji;
withoutEmoji('testing😸');
// ['t', 'e', 's', 't', 'i', 'n', 'g']
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc