UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

12 lines 457 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Tests to see if the object is an ES2015 (ES6) Promise * @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects} * @param value the object to test */ function isPromise(value) { return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; } exports.isPromise = isPromise; //# sourceMappingURL=isPromise.js.map