mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-09 11:55:09 +01:00
update comments and rename
This commit is contained in:
parent
0ceff0262d
commit
64b1bb40ff
@ -21,11 +21,11 @@ const _ = require('lodash');
|
|||||||
const emojiMap = require('./emoji_map.json');
|
const emojiMap = require('./emoji_map.json');
|
||||||
// This json file is downloaded from https://github.com/iamcal/emoji-data/
|
// This json file is downloaded from https://github.com/iamcal/emoji-data/
|
||||||
// and is used to correct the sheet coordinates since we're using that repo's sheet
|
// and is used to correct the sheet coordinates since we're using that repo's sheet
|
||||||
const emojiDataJson = require('./emoji_sheet.json');
|
const emojiSheetData = require('./emoji_sheet.json');
|
||||||
const { unicodeToFilename } = require('./unicode_to_filename');
|
const { unicodeToFilename } = require('./unicode_to_filename');
|
||||||
const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
|
const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
|
||||||
|
|
||||||
// Grabbed from `emoji_utils` to prevent circular dependency
|
// Grabbed from `emoji_utils` to avoid circular dependency
|
||||||
function unifiedToNative(unified) {
|
function unifiedToNative(unified) {
|
||||||
let unicodes = unified.split('-'),
|
let unicodes = unified.split('-'),
|
||||||
codePoints = unicodes.map((u) => `0x${u}`);
|
codePoints = unicodes.map((u) => `0x${u}`);
|
||||||
@ -45,7 +45,7 @@ let data = {
|
|||||||
emojis: _(emojiMart5Data.emojis).values().map(emoji => {
|
emojis: _(emojiMart5Data.emojis).values().map(emoji => {
|
||||||
let skin_variations = {};
|
let skin_variations = {};
|
||||||
const unified = emoji.skins[0].unified.toUpperCase();
|
const unified = emoji.skins[0].unified.toUpperCase();
|
||||||
const emojiFromRawData = emojiDataJson.find(e => e.unified === unified);
|
const emojiFromRawData = emojiSheetData.find(e => e.unified === unified);
|
||||||
|
|
||||||
if (!emojiFromRawData) {
|
if (!emojiFromRawData) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user