Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const needle = require('needle');
const _ = require('lodash');
const jsEmoji = require('emoji-js');
const fs = require('fs');
const Emoji = new jsEmoji.EmojiConvertor();
Emoji.img_set = 'twitter';
function getUnified(emoji) {
Emoji.replace_mode = 'unified';
const converted = Emoji.replace_colons(`:${emoji.s[0]}:`);
if (!converted.startsWith(':') && !converted.startsWith('
synonymous: HIGHLIGHT_TERMS.find((item) => item[0] === v)
};
return a;
}, {});
jsonfile.writeFileSync(destination_path, obj, { spaces: 2 });
});
} else {
console.log("Error: File in 'path' not found.");
}
}
/**
* Convert markdown message to HTML
*/
const emojiConvertor = new emoji.EmojiConvertor();
emojiConvertor.replace_mode = 'unified';
emojiConvertor.allow_native = true;
const convertMessage = (message) => emojiConvertor.replace_colons(marked(message.trim()));
/**
* Process the message and count the times a important word occurs
*
* @param {string} message
* @param {object} highlights
*/
const highlightTerms = (message, highlights = {}) => {
let collection = {};
for (let synonymous of HIGHLIGHT_TERMS) {
let count = highlights[synonymous[0]] || 0;
import jsEmoji from 'emoji-js';
import { sortBy } from 'lodash';
import emojis from '../../emojis/emojis';
import { $ } from './util';
const Emoji = new jsEmoji.EmojiConvertor();
const emojiSheet = chrome.extension.getURL('emojis/sheet_twitter_64.png');
Emoji.img_set = 'twitter';
const catOrder = {
'Smileys & People': -80,
'Animals & Nature': -70,
'Food & Drink': -60,
Activities: -50,
'Travel & Places': -40,
Objects: -30,
Symbols: -20,
Flags: -10,
};
const catNames = Object.keys(catOrder);
import jsEmoji from 'emoji-js';
import { sortBy } from 'lodash';
import emojis from '../../../emojis/emojis';
import { getExtensionUrl } from '../browserHelper';
const Emoji = new jsEmoji.EmojiConvertor();
const emojiSheet = getExtensionUrl('emojis/sheet_twitter_64.png');
Emoji.img_set = 'twitter';
export const colonRegex = /:([a-z0-9_\-+]+):?:?([a-z0-9_-]+)?:?$/;
const catOrder = {
'Smileys & People': -80,
'Animals & Nature': -70,
'Food & Drink': -60,
Activities: -50,
'Travel & Places': -40,
Objects: -30,
Symbols: -20,
Flags: -10,
};