Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utils.js « emoji « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eb3dcea73c017ee1a28a4270dcc0f3ff03e319ea (plain)
1
2
3
4
5
6
7
8
import emojiIntents from 'emojis/intents.json';
import { NEUTRAL_INTENT_MULTIPLIER } from '~/emoji/constants';

export function getEmojiScoreWithIntent(emojiName, baseScore) {
  const intentMultiplier = emojiIntents[emojiName] || NEUTRAL_INTENT_MULTIPLIER;

  return 2 ** baseScore * intentMultiplier;
}