dir.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _consoleFunc = require('./internal/consoleFunc');
  6. var _consoleFunc2 = _interopRequireDefault(_consoleFunc);
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. /**
  9. * Logs the result of an `async` function to the `console` using `console.dir`
  10. * to display the properties of the resulting object. Only works in Node.js or
  11. * in browsers that support `console.dir` and `console.error` (such as FF and
  12. * Chrome). If multiple arguments are returned from the async function,
  13. * `console.dir` is called on each argument in order.
  14. *
  15. * @name dir
  16. * @static
  17. * @memberOf module:Utils
  18. * @method
  19. * @category Util
  20. * @param {Function} function - The function you want to eventually apply all
  21. * arguments to.
  22. * @param {...*} arguments... - Any number of arguments to apply to the function.
  23. * @example
  24. *
  25. * // in a module
  26. * var hello = function(name, callback) {
  27. * setTimeout(function() {
  28. * callback(null, {hello: name});
  29. * }, 1000);
  30. * };
  31. *
  32. * // in the node repl
  33. * node> async.dir(hello, 'world');
  34. * {hello: 'world'}
  35. */
  36. exports.default = (0, _consoleFunc2.default)('dir');
  37. module.exports = exports['default'];