INNER CODE UNIT · JavaScript

checkMetricsPermission

clinicjs/node-clinic · bin.js:275

function checkMetricsPermission (cb) {
  /* istanbul ignore if: tracking intentionally disabled when running tests */
  if (insight.optOut === undefined) {
    return promisify(insight.askPermission).call(
      insight,
      'May Clinic.js report anonymous usage statistics to improve the tool over time?'
    )
  }
  return Promise.resolve()
}

async function trackTool (toolName, args, toolVersion) {
  let action = 'run'
  if (args['visualize-only']) {
    action = 'visualize-only'
  } else if (args['collect-only']) {
    action = 'collect-only'
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…