Questionnaire-of-the-Facebo.../node_modules/is-npm/index.js

10 lines
309 B
JavaScript
Raw Normal View History

2021-03-11 01:43:28 +00:00
'use strict';
const userAgent = process.env.npm_config_user_agent;
const isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));
const isNpm = Boolean(userAgent && userAgent.startsWith('npm'));
module.exports.isNpmOrYarn = isNpm || isYarn;
module.exports.isNpm = isNpm;
module.exports.isYarn = isYarn;