Socket
Socket
Sign inDemoInstall

node-emoji

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-emoji - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

4

lib/emoji.js
/*jslint node: true*/
require('string.prototype.codepointat');
"use strict";

@@ -50,3 +52,3 @@

if (Emoji.emoji.hasOwnProperty(prop)) {
if (Emoji.emoji[prop] === emoji_code) {
if (Emoji.emoji[prop].codePointAt() === emoji_code.codePointAt()) {
return prop;

@@ -53,0 +55,0 @@ }

{
"name": "node-emoji",
"version": "1.2.1",
"version": "1.3.0",
"description": "simple emoji support for node.js projects",

@@ -10,7 +10,20 @@ "author": "Daniel Bugl <daniel.bugl@touchlay.com>",

},
"keywords": ["emoji", "simple", "emoticons", "emoticon", "emojis", "smiley", "smileys", "smilies", "ideogram", "ideograms"],
"keywords": [
"emoji",
"simple",
"emoticons",
"emoticon",
"emojis",
"smiley",
"smileys",
"smilies",
"ideogram",
"ideograms"
],
"bugs": {
"url": "https://github.com/omnidan/node-emoji/issues"
},
"dependencies": {},
"dependencies": {
"string.prototype.codepointat": "^0.2.0"
},
"devDependencies": {

@@ -17,0 +30,0 @@ "mocha": "^2.4.5",

@@ -30,2 +30,14 @@ /*jslint node: true*/

});
it("should work for differently formed characters", function () {
var umbrella = emoji.which('☔');
should.exist(umbrella);
umbrella.should.be.exactly('umbrella');
});
it("should return the same name for differently formed characters", function () {
var umbrella1 = emoji.which('☔');
should.exist(umbrella1);
var umbrella2 = emoji.which('☔️');
should.exist(umbrella2);
umbrella1.should.equal(umbrella2);
});
});

@@ -32,0 +44,0 @@

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