node-emoji
Advanced tools
Comparing version 1.2.1 to 1.3.0
/*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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143904
1446
1
+ Addedstring.prototype.codepointat@0.2.1(transitive)