code: function isPromise (input) {
    if (input) {
      const isPromise = isDefined(Promise) && input instanceof Promise;
      const isThenable = input.then && typeof input.then === 'function';
      return !!(isPromise || isThenable)
    } else {
      return false
    }
  }
docs: Returns true if the input is a Promise.
  @param {*} - the input to test
  @returns {boolean}
  @static