debug.js 357 B

12345678910111213141516
  1. 'use strict';
  2. const { inspect } = require('util');
  3. // this format object as string, resolves circular reference
  4. function inspectObject(object, options) {
  5. return inspect(object, options);
  6. }
  7. // wrapper to log to console
  8. function log(...args) {
  9. return Reflect.apply(console.log, null, args);
  10. }
  11. exports.inspectObject = inspectObject;
  12. exports.log = log;