Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
emojis: CanonicalEmoji[];
source: Source;
}
// Share between all instances
const loaded: Set = new Set();
const promise: Map> = new Map();
export function resetLoaded() {
if (__DEV__) {
loaded.clear();
promise.clear();
}
}
const EMOJIBASE_LATEST_VERSION = require('emojibase/package.json').version;
export default function withEmojiData(options: WithEmojiDataOptions = {}) /* infer */ {
const { alwaysRender = false, compact = false, emojis = [], throwErrors = true } = options;
return function withEmojiDataFactory(
Component: React.ComponentType,
): React.ComponentType {
const baseName = Component.displayName || Component.name;
class WithEmojiData extends React.PureComponent<
Props & WithEmojiDataWrapperProps,
WithEmojiDataState
> {
static displayName = `withEmojiData(${baseName})`;
static defaultProps: any = {