You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
309B

  1. 'use strict';
  2. const userAgent = process.env.npm_config_user_agent;
  3. const isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));
  4. const isNpm = Boolean(userAgent && userAgent.startsWith('npm'));
  5. module.exports.isNpmOrYarn = isNpm || isYarn;
  6. module.exports.isNpm = isNpm;
  7. module.exports.isYarn = isYarn;