Sha256: e477c1433b61df81a6853ee85b67849d070cce7414621aa7b7c7bbfdbbe2655f

Contents?: true

Size: 916 Bytes

Versions: 26

Compression:

Stored size: 916 Bytes

Contents

{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Determines if the current process is a Node.js process.\n */\nexport function isNodeProcess(): boolean {\n  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n    return true\n  }\n\n  if (typeof process !== 'undefined') {\n    // Electron (https://www.electronjs.org/docs/latest/api/process#processtype-readonly)\n    const type = (process as any).type\n    if (type === 'renderer' || type === 'worker') {\n      return false\n    }\n\n\n    return !!(\n      process.versions &&\n      process.versions.node\n    )\n  }\n\n  return false\n}\n"],"mappings":";AAGO,SAAS,gBAAyB;AACvC,MAAI,OAAO,cAAc,eAAe,UAAU,YAAY,eAAe;AAC3E,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,YAAY,aAAa;AAElC,UAAM,OAAQ,QAAgB;AAC9B,QAAI,SAAS,cAAc,SAAS,UAAU;AAC5C,aAAO;AAAA,IACT;AAGA,WAAO,CAAC,EACN,QAAQ,YACR,QAAQ,SAAS;AAAA,EAErB;AAEA,SAAO;AACT;","names":[]}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.25 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.24 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.23 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.22 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.21 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.20 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.19 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.18 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.17 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.16 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.15 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.14 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.13 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.12 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.11 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.10 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.9 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.8 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map
clapton-0.0.7 lib/clapton/javascripts/node_modules/is-node-process/lib/index.mjs.map