How to use emojibase-regex - 1 common examples

To help you get started, we’ve selected a few emojibase-regex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github milesj / interweave / packages / emoji / src / EmojiMatcher.ts View on Github external
hexcode?: string;
  shortcode?: string;
  unicode?: string;
}

export interface EmojiMatcherOptions {
  convertEmoticon?: boolean;
  convertShortcode?: boolean;
  convertUnicode?: boolean;
  enlargeThreshold?: number;
  renderUnicode?: boolean;
}

const EMOTICON_BOUNDARY_REGEX = new RegExp(
  // eslint-disable-next-line no-useless-escape
  `(^|\\\b|\\\s)(${EMOTICON_REGEX.source})(?=\\\s|\\\b|$)`,
);

export default class EmojiMatcher extends Matcher {
  data: EmojiDataManager | null = null;

  greedy: boolean = true;

  constructor(
    name: string,
    options?: EmojiMatcherOptions,
    factory?: React.ComponentType | null,
  ) {
    super(
      name,
      {
        convertEmoticon: false,

emojibase-regex

Evergreen emoji regex patterns.

MIT
Latest version published 15 days ago

Package Health Score

83 / 100
Full package analysis

Popular emojibase-regex functions