/* @flow */
/* eslint-disable */
import 'string.fromcodepoint';

import codePointMap from './codePointMap';

export const nameToEmojiMap = Object.keys(codePointMap).reduce((obj, key) => {
  obj[key] = String.fromCodePoint(parseInt(codePointMap[key], 16));
  return obj;
}, {});

export const codeToEmojiMap = Object.values(codePointMap).reduce((obj, key) => {
  // $FlowFixMe
  obj[key] = String.fromCodePoint(parseInt(key, 16));
  return obj;
}, {});

export default nameToEmojiMap;

/* @flow */
/* eslint-disable */
import 'string.fromcodepoint';

import codePointMap from './codePointMap';

export const nameToEmojiMap = Object.keys(codePointMap).reduce((obj, name) => {
  obj[name] = String.fromCodePoint(parseInt(codePointMap[name], 16));
  return obj;
}, ({}: { [string]: string }));

export const codeToEmojiMap = Object.keys(codePointMap).reduce((obj, name) => {
  obj[name] = String.fromCodePoint(parseInt(codePointMap[name], 16));
  return obj;
}, ({}: { [string]: string }));

export default nameToEmojiMap;

Add types on Unicode-emoji mapmaking code.
emoji: Add types on Unicode-emoji mapmaking code.

Sadly `Object.values` has a bogus type in Flow's definitions,
returning `Array<mixed>`; the least-ugly solution I can find is to
switch to `Object.keys`.
