Files
zoff/server/node_modules/emoji-strip/node_modules/gemoji/index.js
Kasper Rynning-Tønnesen 5b626696bd Added files
2015-07-07 21:44:09 +02:00

28 lines
575 B
JavaScript

'use strict';
var gemoji, named, unicodes, unicode, has, key;
gemoji = require('./data/gemoji.json');
has = Object.prototype.hasOwnProperty;
unicodes = {};
named = {};
for (key in gemoji) {
/* istanbul ignore else */
if (has.call(gemoji, key)) {
unicode = gemoji[key];
named[key] = unicode;
/* Some unicode emoji have aliasses, here we make sure the emoji is
* written once. */
if (!has.call(unicodes, unicode)) {
unicodes[unicode] = key;
}
}
}
exports.unicode = unicodes;
exports.name = named;