Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
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