aboutsummaryrefslogtreecommitdiff
path: root/node_modules/when/lib/decorators/inspect.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/when/lib/decorators/inspect.js')
-rw-r--r--node_modules/when/lib/decorators/inspect.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/node_modules/when/lib/decorators/inspect.js b/node_modules/when/lib/decorators/inspect.js
new file mode 100644
index 00000000..95b87157
--- /dev/null
+++ b/node_modules/when/lib/decorators/inspect.js
@@ -0,0 +1,20 @@
+/** @license MIT License (c) copyright 2010-2014 original author or authors */
+/** @author Brian Cavalier */
+/** @author John Hann */
+
+(function(define) { 'use strict';
+define(function(require) {
+
+ var inspect = require('../state').inspect;
+
+ return function inspection(Promise) {
+
+ Promise.prototype.inspect = function() {
+ return inspect(Promise._handler(this));
+ };
+
+ return Promise;
+ };
+
+});
+}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));