Sha256: f5b2ed47243f8d085858acda34935b7585c75eb191c3be96505b48d35b58aaf7

Contents?: true

Size: 362 Bytes

Versions: 26

Compression:

Stored size: 362 Bytes

Contents

'use strict';

Object.defineProperty(exports, '__esModule', {
  value: true,
});
exports.isPromise = isPromise;

/**
 * Returns true if the value acts like a Promise, i.e. has a "then" function,
 * otherwise returns false.
 */
function isPromise(value) {
  return (
    typeof (value === null || value === void 0 ? void 0 : value.then) ===
    'function'
  );
}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.6 lib/clapton/javascripts/node_modules/graphql/jsutils/isPromise.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/graphql/jsutils/isPromise.js
clapton-0.0.4 lib/clapton/javascripts/node_modules/graphql/jsutils/isPromise.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/graphql/jsutils/isPromise.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/graphql/jsutils/isPromise.js
clapton-0.0.1 lib/clapton/javascripts/node_modules/graphql/jsutils/isPromise.js