From f6fcae44897c2ced66e31e81af3d62eed8811d37 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 18 Oct 2018 10:53:42 +0200 Subject: [PATCH] chore(xo-server/utils): remove unused pDebug --- packages/xo-server/src/utils.js | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/packages/xo-server/src/utils.js b/packages/xo-server/src/utils.js index 8dc928f74..1869196df 100644 --- a/packages/xo-server/src/utils.js +++ b/packages/xo-server/src/utils.js @@ -6,7 +6,6 @@ import humanFormat from 'human-format' import isArray from 'lodash/isArray' import isString from 'lodash/isString' import keys from 'lodash/keys' -import kindOf from 'kindof' import multiKeyHashInt from 'multikey-hash' import pick from 'lodash/pick' import tmp from 'tmp' @@ -192,35 +191,6 @@ export const noop = () => {} // ------------------------------------------------------------------- -// Usage: pDebug(promise, name) or promise::pDebug(name) -export function pDebug (promise, name) { - if (arguments.length === 1) { - name = promise - promise = this - } - - Promise.resolve(promise).then( - value => { - console.log( - '%s', - `Promise ${name} resolved${ - value !== undefined ? ` with ${kindOf(value)}` : '' - }` - ) - }, - reason => { - console.log( - '%s', - `Promise ${name} rejected${ - reason !== undefined ? ` with ${kindOf(reason)}` : '' - }` - ) - } - ) - - return promise -} - // Given a collection (array or object) which contains promises, // return a promise that is fulfilled when all the items in the // collection are either fulfilled or rejected.