inspect.js 517 B

1234567891011121314151617181920
  1. /** @license MIT License (c) copyright 2010-2014 original author or authors */
  2. /** @author Brian Cavalier */
  3. /** @author John Hann */
  4. (function(define) { 'use strict';
  5. define(function(require) {
  6. var inspect = require('../state').inspect;
  7. return function inspection(Promise) {
  8. Promise.prototype.inspect = function() {
  9. return inspect(Promise._handler(this));
  10. };
  11. return Promise;
  12. };
  13. });
  14. }(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));