load-http.js 230 B

1234567
  1. /**
  2. * @param {boolean} isHTTPS true when need https module, otherwise false
  3. * @returns {Promise<import("http") | import("https")>}
  4. */
  5. module.exports = function (isHTTPS) {
  6. return isHTTPS ? import("https") : import("http");
  7. };