How to use wtfnode - 9 common examples

To help you get started, we’ve selected a few wtfnode 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 DefinitelyTyped / DefinitelyTyped / types / wtfnode / wtfnode-tests.ts View on Github external
/// 

import * as wtf from 'wtfnode';

wtf.init();
wtf.setLogger('info', (message?: any, ...optionalParams: any[]) => console.info(message, ...optionalParams));
wtf.setLogger('warn', (message?: any, ...optionalParams: any[]) => console.warn(message, ...optionalParams));
wtf.setLogger('error', (message?: any, ...optionalParams: any[]) => console.error(message, ...optionalParams));
wtf.dump();
wtf.resetLoggers();
github DefinitelyTyped / DefinitelyTyped / types / wtfnode / wtfnode-tests.ts View on Github external
/// 

import * as wtf from 'wtfnode';

wtf.init();
wtf.setLogger('info', (message?: any, ...optionalParams: any[]) => console.info(message, ...optionalParams));
wtf.setLogger('warn', (message?: any, ...optionalParams: any[]) => console.warn(message, ...optionalParams));
wtf.setLogger('error', (message?: any, ...optionalParams: any[]) => console.error(message, ...optionalParams));
wtf.dump();
wtf.resetLoggers();
github DefinitelyTyped / DefinitelyTyped / types / wtfnode / wtfnode-tests.ts View on Github external
/// 

import * as wtf from 'wtfnode';

wtf.init();
wtf.setLogger('info', (message?: any, ...optionalParams: any[]) => console.info(message, ...optionalParams));
wtf.setLogger('warn', (message?: any, ...optionalParams: any[]) => console.warn(message, ...optionalParams));
wtf.setLogger('error', (message?: any, ...optionalParams: any[]) => console.error(message, ...optionalParams));
wtf.dump();
wtf.resetLoggers();
github DefinitelyTyped / DefinitelyTyped / types / wtfnode / wtfnode-tests.ts View on Github external
/// 

import * as wtf from 'wtfnode';

wtf.init();
wtf.setLogger('info', (message?: any, ...optionalParams: any[]) => console.info(message, ...optionalParams));
wtf.setLogger('warn', (message?: any, ...optionalParams: any[]) => console.warn(message, ...optionalParams));
wtf.setLogger('error', (message?: any, ...optionalParams: any[]) => console.error(message, ...optionalParams));
wtf.dump();
wtf.resetLoggers();
github discordjs / RPC / test / lobby.js View on Github external
'use strict';

/* eslint-disable no-console */

try {
  require('wtfnode').init();
} catch (err) {} // eslint-disable-line no-empty

const { Client } = require('../');

const { clientId, clientSecret } = require('./auth');

const client = new Client({ transport: 'ipc' });

client.on('ready', async () => {
  console.log(client.user);

  await client.setActivity({
    state: 'slithering',
    details: '🐍',
    startTimestamp: new Date(),
    largeImageKey: 'snek_large',
github discordjs / RPC / test / rp.js View on Github external
'use strict';

/* eslint-disable no-console */

try {
  require('wtfnode').init();
} catch (err) {} // eslint-disable-line no-empty

const { Client } = require('../');

const { clientId } = require('./auth');

const client = new Client({ transport: 'ipc' });

client.on('ready', () => {
  console.log(client);

  client.subscribe('ACTIVITY_JOIN', ({ secret }) => {
    console.log('should join game with secret:', secret);
  });

  client.subscribe('ACTIVITY_SPECTATE', ({ secret }) => {
github DefinitelyTyped / DefinitelyTyped / types / wtfnode / wtfnode-tests.ts View on Github external
/// 

import * as wtf from 'wtfnode';

wtf.init();
wtf.setLogger('info', (message?: any, ...optionalParams: any[]) => console.info(message, ...optionalParams));
wtf.setLogger('warn', (message?: any, ...optionalParams: any[]) => console.warn(message, ...optionalParams));
wtf.setLogger('error', (message?: any, ...optionalParams: any[]) => console.error(message, ...optionalParams));
wtf.dump();
wtf.resetLoggers();
github mongodb / node-mongodb-native / test / tools / runner / plugins / client_leak_checker.js View on Github external
after(function() {
  wtfnode.dump();

  const isUnifiedTopology = this.configuration.usingUnifiedTopology;
  const traces = [];
  const openClientCount = activeClients.reduce((count, client) => {
    const isConnected = isUnifiedTopology
      ? unifiedTopologyIsConnected(client)
      : client.isConnected();

    if (isConnected) {
      traces.push(client.trace);
      return count + 1;
    }

    return count;
  }, 0);
github gitterHQ / halley / test / helpers / cleanup-test-process.js View on Github external
setInterval(function() {
      wtf.dump();
    }, 1000).unref();
  })

wtfnode

Utility to help find out why Node isn't exiting

ISC
Latest version published 1 month ago

Package Health Score

75 / 100
Full package analysis

Similar packages