MCPcopy
hub / github.com/Unitech/pm2 / getModule

Method getModule

modules/pm2-io-agent/src/Utility.js:324–326  ·  view source on GitHub ↗

* Return native module (HTTP/HTTPS) * @param {String} url

(url)

Source from the content-addressed store, hash-verified

322 * @param {String} url
323 */
324 getModule (url) {
325 return url.match(/https:\/\//) ? require('https') : require('http')
326 }
327 /**
328 * Send an HTTP request and return data or error if status > 200
329 * @param {Object} opts

Callers 1

openMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected