index.js 299 B

12345678910111213
  1. 'use strict';
  2. const npmConf = require('npm-conf')();
  3. module.exports = () => {
  4. return process.env.HTTPS_PROXY ||
  5. process.env.https_proxy ||
  6. process.env.HTTP_PROXY ||
  7. process.env.http_proxy ||
  8. npmConf.get('https-proxy') ||
  9. npmConf.get('http-proxy') ||
  10. npmConf.get('proxy') ||
  11. null;
  12. };