src/promisify.js
function promisifyAll(obj, options) {
  if (!obj) {
    // This object could be anything, including a function, a real object, or an array.
    throw new TypeError('promisify.all requires a truthy value');
  }

  const out = {};

  for (var name in obj) {
    if (typeof obj[name] === 'function') {
      out[name] = promisify(obj[name].bind(obj), options);
    }
  }

  return out;
}
function promisifyAll(obj, options) {
  if (!obj) {
    // This object could be anything, including a function, a real object, or an array.
    throw new TypeError('promisify.all requires a truthy value');
  }

  const out = {};

  for (var name in obj) {
    if (typeof obj[name] === 'function') {
      out[name] = promisify(obj[name].bind(obj), options);
    }
  }

  return out;
}
Promisify all functions on the given object.

@param {*} obj A value that can have properties.
@param {Boolean|String[]} options.variadic See the documentation for promisify.
@return {Object} The promisified object.