'use strict';varcallBound=require('../helpers/callBound');var$PromiseThen=callBound('Promise.prototype.then',true);varType=require('./Type');// https://www.ecma-international.org/ecma-262/6.0/#sec-ispromisemodule.exports=functionIsPromise(x){if(Type(x)!=='Object'){returnfalse;}if(!$PromiseThen){// Promises are not supportedreturnfalse;}try{$PromiseThen(x);// throws if not a promise}catch(e){returnfalse;}returntrue;};