mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
28 lines
575 B
JavaScript
Executable File
28 lines
575 B
JavaScript
Executable File
'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;
|