HOME


sh-3ll 1.0
DIR:/proc/self/cwd/bright.medisavehealthcarebd.com/node_modules/postcss-functions/dist/lib/
Upload File :
Current File : //proc/self/cwd/bright.medisavehealthcarebd.com/node_modules/postcss-functions/dist/lib/helpers.js
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isPromise = isPromise;
exports.hasPromises = hasPromises;
exports.then = then;
function isPromise(obj) {
  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}

function hasPromises(arr) {
  return arr.some(function (item) {
    return isPromise(item);
  });
}

function then(promiseOrResult, onFulfilled) {
  if (isPromise(promiseOrResult)) return promiseOrResult.then(onFulfilled);

  return onFulfilled(promiseOrResult);
}