Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const writeSnippets = (type, prefix = '', suffix = '') => {
for (let i = 0; i < emojiAll.length; i++) {
let emoji, json, name, output, unicode;
if (typeof emojiAll[i].name != 'undefined' && emojiAll[i].name !== null ) {
name = emojiAll[i].name.toLowerCase().replace(/[\s,\.]+/g, '-');
} else {
name = emojiAll[i].short_name;
}
unicodes = emojiAll[i].hexcode.split('-');
unicodes.forEach(function(unicode, index) {
if (type === 'python') {
unicode = String('0000000' + unicode).slice(-8);
} else if (type === 'csharp') {
unicode = findSurrogatePair(parseInt(unicode, 16)).join('\\u');
}
{({ height, width }) => (