How to use the node-emoji.emoji 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 inikulin / publish-please / test / 01-elegant-status-reporter.spec.js View on Github external
'use strict';

/* eslint-disable no-unused-vars */
const should = require('should');
const packageName = require('./utils/publish-please-version-under-test');
const reporter = require('../lib/reporters/elegant-status-reporter');
const rename = require('fs').renameSync;
const pathJoin = require('path').join;
const emoji = require('node-emoji').emoji;
const chalk = require('chalk');
const envType = require('../lib/reporters/env-type');
const lineSeparator = '----------------------------------';

describe('Elegant status reporter', () => {
    let nativeExit;
    let nativeConsoleLog;
    let nativeIsCI;
    let exitCode;
    let output;

    beforeEach(() => {
        console.log(`${lineSeparator} begin test ${lineSeparator}`);
        exitCode = undefined;
        output = '';
        nativeExit = process.exit;
github inikulin / publish-please / src / validations / index.js View on Github external
const chalk = require('chalk');
const elegantStatus = require('elegant-status');
const emoji = require('node-emoji').emoji;

const validations = [
    require('./vulnerable-dependencies'),
    require('./uncommitted-changes'),
    require('./untracked-files'),
    require('./sensitive-data'),
    require('./branch'),
    require('./git-tag'),
];

function runValidation(validation, param, pkg, errs) {
    const done = elegantStatus(validation.statusText);

    // prettier-ignore
    return validation
        .run(param, pkg)
github telemmo / telemmo / src / routes / create-character.js View on Github external
bot.sendMessage(msg.chat.id, view.buildMessage(className), view.buildOptions(className))
    })
    .catch((e) => {
      console.log(e)
      bot.sendMessage(msg.chat.id, view.error, view.errorKeyboard)
    })
}

function checkClass (className) {
  if (!classFromName(className)) {
    throw new Error(`Class doesn't exist`)
  }
}

module.exports = {
  message: new RegExp(`${emoji.emoji.question} (.+)`),
  handler,
}
github inikulin / publish-please / src / reporters / elegant-status-reporter.js View on Github external
function reportSucceededSequence(_message) {
    const chalk = require('chalk');
    const emoji = require('node-emoji').emoji;
    console.log(chalk.yellow('-------------------'));
    console.log(emoji['+1'], emoji['+1'], emoji['+1']);
    console.log('');
}
github Foundry376 / Mailspring / app / src / components / composer-editor / emoji-plugins.jsx View on Github external
export function getEmojiSuggestions(word) {
  const emojiOptions = [];
  const emojiNames = Object.keys(NodeEmoji.emoji).sort();
  for (const emojiName of emojiNames) {
    if (word === emojiName.substring(0, word.length)) {
      emojiOptions.push(emojiName);
    }
  }
  return emojiOptions;
}
github inikulin / publish-please / lib / publish.js View on Github external
'use strict';

const readFile        = require('fs').readFileSync;
const chalk           = require('chalk');
const defaults        = require('lodash/defaultsDeep');
const pkgd            = require('pkgd');
const exec            = require('cp-sugar').exec;
const spawn           = require('cp-sugar').spawn;
const emoji           = require('node-emoji').emoji;
const validate        = require('./validations').validate;
const confirm         = require('./utils/inquires').confirm;
const DEFAULT_OPTIONS = require('./default-options');


function printReleaseInfo (pkgVersion, publishTag) {
    let commitInfo = null;

    return exec('git log -1 --oneline')
        .then(info => {
            commitInfo = info;

            return exec('npm whoami --silent');
        })
        .catch(() => chalk.red(''))
        .then(publisher => {
github Foundry376 / Mailspring / app / internal_packages / composer-emoji / lib / emoji-composer-extension.jsx View on Github external
static _findMatches(word) {
    const emojiOptions = [];
    const emojiNames = Object.keys(emoji.emoji).sort();
    for (const emojiName of emojiNames) {
      if (word === emojiName.substring(0, word.length)) {
        emojiOptions.push(emojiName);
      }
    }
    return emojiOptions;
  }
}
github inikulin / publish-please / lib / validations / index.js View on Github external
const noop          = require('lodash/noop');
const chalk         = require('chalk');
const elegantStatus = require('elegant-status');
const emoji         = require('node-emoji').emoji;

const validations = [
    require('./vulnerable-dependencies'),
    require('./uncommitted-changes'),
    require('./untracked-files'),
    require('./sensitive-data'),
    require('./branch'),
    require('./git-tag')
];

function runValidation (validation, param, pkgInfo, errs) {
    const done = module.exports.testMode ? noop : elegantStatus(validation.statusText);

    return validation
        .run(param, pkgInfo)
        .then(() => done(true))
github Foundry376 / Mailspring / internal_packages / composer-emoji / lib / emoji-composer-extension.jsx View on Github external
static _findMatches(word) {
    const emojiOptions = []
    const emojiNames = Object.keys(emoji.emoji).sort();
    for (const emojiName of emojiNames) {
      if (word === emojiName.substring(0, word.length)) {
        emojiOptions.push(emojiName);
      }
    }
    return emojiOptions;
  }
github Foundry376 / Mailspring / app / src / components / composer-editor / emoji-plugins.tsx View on Github external
export function getEmojiSuggestions(word: string) {
  const emojiOptions = [];
  const emojiNames = Object.keys(NodeEmoji.emoji).sort();
  for (const emojiName of emojiNames) {
    if (word === emojiName.substring(0, word.length)) {
      emojiOptions.push(emojiName);
    }
  }
  return emojiOptions;
}