summaryrefslogtreecommitdiff
path: root/alarm/node_modules/graphql/jsutils/isPromise.js
diff options
context:
space:
mode:
Diffstat (limited to 'alarm/node_modules/graphql/jsutils/isPromise.js')
-rw-r--r--alarm/node_modules/graphql/jsutils/isPromise.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/alarm/node_modules/graphql/jsutils/isPromise.js b/alarm/node_modules/graphql/jsutils/isPromise.js
new file mode 100644
index 0000000..bca6ccc
--- /dev/null
+++ b/alarm/node_modules/graphql/jsutils/isPromise.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isPromise;
+
+/**
+ * Returns true if the value acts like a Promise, i.e. has a "then" function,
+ * otherwise returns false.
+ */
+// eslint-disable-next-line no-redeclare
+function isPromise(value) {
+ return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';
+}