How to use the node-emoji.emojify function in node-emoji

To help you get started, we’ve selected a few node-emoji 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 matrix-org / matrix-appservice-slack / src / substitutions.ts View on Github external
log.debug("running substitutions on ", body);
        body = this.htmlUnescape(body);
        body = body.replace("", "@room");
        body = body.replace("", "@room");
        body = body.replace("", "@room");

        // if we have a file, attempt to get the direct link to the file
        if (file && file.public_url_shared) {
            const url = this.getSlackFileUrl({
                permalink_public: file.permalink_public!,
                url_private: file.url_private!,
            });
            body = url ? body.replace(file.permalink!, url) : body;
        }

        body = emoji.emojify(body, getFallbackForMissingEmoji);

        return body;
    }
github ersel / spotify-cli-mac / printers / index.js View on Github external
function printDurationProgress(result){
	var statusButton = result.status === 'playing' ? ':arrow_forward:' : ':double_vertical_bar:';
	statusButton = emoji.emojify(statusButton);
	new ProgressBar(`${statusButton}  ${result.status} [:bar] ${result.position} of ${result.duration}`, {
		complete: '=',
		incomplete: ' ',
		width: 50,
		total: result.durationSecs
	}).tick(result.positionSecs);
	console.log();
}
github conversationai / perspectiveapi-authorship-demo / src / app / customizable-demo-form.component.ts View on Github external
* FeedbackTextScheme.
 */
const DEFAULT_FEEDBACK_TEST_SET: [string, string, string] = [
  DEFAULT_FEEDBACK_TEXT,
  DEFAULT_FEEDBACK_TEXT,
  DEFAULT_FEEDBACK_TEXT
];

const PLEASE_REVIEW_FEEDBACK_TEST_SET: [string, string, string] = [
  TextFeedbackSchemes.PLEASE_REVIEW_FEEDBACK_TEXT,
  TextFeedbackSchemes.PLEASE_REVIEW_FEEDBACK_TEXT,
  TextFeedbackSchemes.PLEASE_REVIEW_FEEDBACK_TEXT
];

const EMOJIES: [string, string, string] = [
  emoji.emojify(':blush: :smile: :smiley:'),
  emoji.emojify(RAISED_EYEBROW_EMOJI + ' :neutral_face: :thinking_face:'),
  emoji.emojify(':cry: :scream: :angry:'),
];

function arraysEqual(array1: T[], array2: T[]): boolean {
  return array1.length === array2.length &&
    array1.every((element, index) => element === array2[index]);
}


@Component({
  selector: 'customizable-demo-form',
  templateUrl: './customizable-demo-form.component.html',
  styleUrls: ['./customizable-demo-form.component.css'],
})
export class CustomizableDemoFormComponent implements OnInit {
github gabro / cli-typescript-boilerplate / src / utils / index.ts View on Github external
export const logInfo = (s: string) => log(emoji.emojify(chalk.bold(s)));
export const logDetail = (s: string) => log(emoji.emojify(chalk.dim(s)));
github Tarnadas / smmdb / website / src / client / components / panels / Course64Panel.tsx View on Github external
<div style="{styles.editorRendered}"> {
            (this as any).renderer = x
            if (x &amp;&amp; this.state.description) x.innerHTML = emojify(marked(this.state.description))
          }} /&gt;
          </div>
github turt2live / matrix-appservice-webhooks / src / processing / layers / displayName / emoji.js View on Github external
module.exports = (webhook, matrix) => {
    if (webhook.emoji !== false && matrix.sender.displayName) {
        matrix.sender.displayName = emoji.emojify(matrix.sender.displayName, /*onMissing=*/null, /*format=*/null);
    }
};
github Tarnadas / smmdb / src / client / modules / net64 / Net64ServerPanel.tsx View on Github external
private getDescription = (): string => {
    if (!this.props.server.description) return ''
    return sanitize(emojify(marked(this.props.server.description)))
  }
github mocrrrr / issvue / src / pages / post.vue View on Github external
  const replacer = (match) => emoji.emojify(match)
  markdown = markdown.replace(/(:.*:)/g, replacer)
github Tarnadas / smmdb / website / src / client / components / areas / BlogPostEditArea.tsx View on Github external
public async UNSAFE_componentWillUpdate (nextProps: any, nextState: any): Promise {
    if (!nextState.markdown || nextState.markdown === this.state.markdown) return
    if (!this.renderer) return
    this.renderer.innerHTML = emojify(marked(nextState.markdown))
  }
github aerogear / graphback / packages / graphql-migrations / src / utils / log.ts View on Github external
export const logInfo = (s: string) => log(emoji.emojify(chalk.default.bold(s)));
export const logDetail = (s: string) => log(emoji.emojify(chalk.default.dim(s)));