process.js 399 B

12345678910111213141516171819
  1. // Copyright 2017 Lovell Fuller and others.
  2. // SPDX-License-Identifier: Apache-2.0
  3. 'use strict';
  4. const isLinux = () => process.platform === 'linux';
  5. let report = null;
  6. const getReport = () => {
  7. if (!report) {
  8. /* istanbul ignore next */
  9. report = isLinux() && process.report
  10. ? process.report.getReport()
  11. : {};
  12. }
  13. return report;
  14. };
  15. module.exports = { isLinux, getReport };