{"version":3,"sources":["jsdelivr-header.js","/npm/pidusage@4.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,MAAQ,QAAQ,eAWtB,SAAS,SAAU,EAAM,EAAS,GAehC,GAduB,mBAAZ,IACT,EAAW,EACX,EAAU,CAAC,QAGG,IAAZ,IACF,EAAU,CAAC,GAGb,EAAU,OAAO,OAAO,CACtB,MAAO,UAAU,KAAK,QAAQ,IAAI,iBAClC,OAAQ,QAAQ,IAAI,iBACnB,GAEqB,mBAAb,EAKX,OAAO,IAAI,SAAQ,SAAU,EAAS,GACpC,MAAM,EAAM,GAAS,SAAU,EAAK,GAClC,GAAI,EAAK,OAAO,EAAO,GACvB,EAAQ,EACV,GACF,IATE,MAAM,EAAM,EAAS,EAUzB,CAEA,OAAO,QAAU,SACjB,OAAO,QAAQ,MAAQ,QAAQ,iBAAiB","file":"/npm/pidusage@4.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/pidusage@4.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict'\n\nconst stats = require('./lib/stats')\n\n/**\n * Get pid informations.\n * @public\n * @param  {Number|Number[]|String|String[]} pids A pid or a list of pids.\n * @param  {Object} [options={}] Options object\n * @param  {Function} [callback=undefined] Called when the statistics are ready.\n * If not provided a promise is returned instead.\n * @returns  {Promise.<Object>} Only when the callback is not provided.\n */\nfunction pidusage (pids, options, callback) {\n  if (typeof options === 'function') {\n    callback = options\n    options = {}\n  }\n\n  if (options === undefined) {\n    options = {}\n  }\n\n  options = Object.assign({\n    usePs: /^true$/i.test(process.env.PIDUSAGE_USE_PS),\n    maxage: process.env.PIDUSAGE_MAXAGE\n  }, options)\n\n  if (typeof callback === 'function') {\n    stats(pids, options, callback)\n    return\n  }\n\n  return new Promise(function (resolve, reject) {\n    stats(pids, options, function (err, data) {\n      if (err) return reject(err)\n      resolve(data)\n    })\n  })\n}\n\nmodule.exports = pidusage\nmodule.exports.clear = require('./lib/history').clear\n"]}