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.