Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Picker({
compact,
locale,
throwErrors,
version,
...props
}: PickerProps & UseEmojiDataOptions) {
const [emojis, source, data] = useEmojiData({ compact, locale, throwErrors, version });
if (emojis.length === 0) {
return null;
}
return ;
}
export default function Emoji(props: Props) {
const [, emojiSource] = useEmojiData({
avoidFetch: process.env.NODE_ENV === 'test',
throwErrors: false,
});
return (
);
}
export default function Interweave({
content,
filters = [],
matchers = [],
onlyMatchers = [],
withEmoticons,
...props
}: Props) {
const [, emojiSource] = useEmojiData({
avoidFetch: process.env.NODE_ENV === 'test',
throwErrors: false,
});
const finalFilters = [...globalFilters, ...filters];
let finalMatchers = [
...globalMatchers,
emailMatcher,
urlMatcher,
withEmoticons ? emojiMatcherWithEmoticons : emojiMatcher,
...matchers,
];
if (onlyMatchers.length > 0) {
finalMatchers = finalMatchers.filter(matcher => onlyMatchers.includes(matcher.propName));
}