Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grape-web

Package Overview
Dependencies
Maintainers
2
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grape-web - npm Package Compare versions

Comparing version 0.28.0 to 0.29.0

22

lib/x-platform/electron.js

@@ -21,2 +21,6 @@ 'use strict';

var _grapeJsEmoji = require('grape-js-emoji');
var _grapeJsEmoji2 = _interopRequireDefault(_grapeJsEmoji);
var _web = require('./web');

@@ -38,2 +42,18 @@

// http://crocodillon.com/blog/parsing-emoji-unicode-in-javascript
var emojiRegExp = new RegExp(['\\ud83c[\\udf00-\\udfff]', // U+1F300 to U+1F3FF
'\\ud83d[\\udc00-\\ude4f]', // U+1F400 to U+1F64F
'\\ud83d[\\ude80-\\udeff]' // U+1F680 to U+1F6FF
].join('|'), 'g');
/**
* Replaces emoji symbol with it's text representation.
* '👍' => ':+1:'
*/
function replaceEmojisWithText(content) {
return content.replace(emojiRegExp, function (match) {
return ':' + _grapeJsEmoji2['default'].data[match.codePointAt().toString(16)][3][0] + ':';
});
}
function createNotification(options) {

@@ -58,3 +78,3 @@ var callback = arguments.length <= 1 || arguments[1] === undefined ? _lodashUtilityNoop2['default'] : arguments[1];

title: title,
message: content
message: replaceEmojisWithText(content)
});

@@ -61,0 +81,0 @@ setTimeout(function () {

3

package.json
{
"name": "grape-web",
"version": "0.28.0",
"version": "0.29.0",
"dependencies": {

@@ -28,2 +28,3 @@ "jss": "^3.3.0",

"expect.js": "^0.3.1",
"grape-js-emoji": "^0.0.1",
"karma": "^0.13.8",

@@ -30,0 +31,0 @@ "karma-chrome-launcher": "^0.1.10",

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