How to use the @ctrl/ngx-emoji-mart/ngx-emoji.categories.forEach function in @ctrl/ngx-emoji-mart

To help you get started, we’ve selected a few @ctrl/ngx-emoji-mart 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 TypeCtrl / ngx-emoji-mart / src / lib / picker / emoji-search.service.ts View on Github external
}
      if (value === '+' || value === '+1') {
        return [this.emojisList['+1']];
      }

      let values = value.toLowerCase().split(/[\s|,|\-|_]+/);
      let allResults = [];

      if (values.length > 2) {
        values = [values[0], values[1]];
      }

      if (include.length || exclude.length) {
        pool = {};

        categories.forEach(category => {
          const isIncluded =
            include && include.length
              ? include.indexOf(category.id) > -1
              : true;
          const isExcluded =
            exclude && exclude.length
              ? exclude.indexOf(category.id) > -1
              : false;
          if (!isIncluded || isExcluded) {
            return;
          }

          category.emojis.forEach(
            emojiId => {
              // Need to make sure that pool gets keyed
              // with the correct id, which is why we call emojiService.getData below

@ctrl/ngx-emoji-mart

Customizable Slack-like emoji picker for Angular

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Popular @ctrl/ngx-emoji-mart functions