How to use promise-events - 2 common examples

To help you get started, we’ve selected a few promise-events 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 labibramadhan / mastery / src / core / setup / globals.js View on Github external
global.isTest = /test/g.test(process.env.NODE_ENV);

// define rootPath first, needed for requireF
global.rootPath = Path.resolve(Path.join(__dirname, '..', '..'));

const {
  requireF,
} = require(Path.join(rootPath, 'core/services/CommonServices'));
global.requireF = requireF;

const I18nWrapper = requireF('core/services/I18nWrapper');
global.i18n = new I18nWrapper();

global.conf = Nconf;

global.eventEmitter = new EventEmitter();

global.pkg = require(Path.resolve(Path.join(rootPath, '..', 'package.json')));
github probot / probot / src / application.ts View on Github external
constructor (options?: Options) {
    const opts = options || {} as any
    this.events = new EventEmitter()
    this.log = wrapLogger(logger, logger)
    this.app = opts.app
    this.cache = opts.cache
    this.router = opts.router || express.Router() // you can do this?
    this.githubToken = opts.githubToken
    this.throttleOptions = opts.throttleOptions
    this.Octokit = opts.Octokit || ProbotOctokit
  }

promise-events

A promise-based events emitter

MIT
Latest version published 4 years ago

Package Health Score

47 / 100
Full package analysis

Popular promise-events functions