dir.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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]{@link AsyncFunction} to the
  10. * `console` using `console.dir` to display the properties of the resulting object.
  11. * Only works in Node.js or in browsers that support `console.dir` and
  12. * `console.error` (such as FF and Chrome).
  13. * If multiple arguments are returned from the async function,
  14. * `console.dir` is called on each argument in order.
  15. *
  16. * @name dir
  17. * @static
  18. * @memberOf module:Utils
  19. * @method
  20. * @category Util
  21. * @param {AsyncFunction} function - The function you want to eventually apply
  22. * all arguments to.
  23. * @param {...*} arguments... - Any number of arguments to apply to the function.
  24. * @example
  25. *
  26. * // in a module
  27. * var hello = function(name, callback) {
  28. * setTimeout(function() {
  29. * callback(null, {hello: name});
  30. * }, 1000);
  31. * };
  32. *
  33. * // in the node repl
  34. * node> async.dir(hello, 'world');
  35. * {hello: 'world'}
  36. */
  37. exports.default = (0, _consoleFunc2.default)('dir');
  38. module.exports = exports['default'];