18 lines
436 B
JavaScript
18 lines
436 B
JavaScript
// src/index.ts
|
|
function isNodeProcess() {
|
|
if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
|
|
return true;
|
|
}
|
|
if (typeof process !== "undefined") {
|
|
const type = process.type;
|
|
if (type === "renderer" || type === "worker") {
|
|
return false;
|
|
}
|
|
return !!(process.versions && process.versions.node);
|
|
}
|
|
return false;
|
|
}
|
|
export {
|
|
isNodeProcess
|
|
};
|
|
//# sourceMappingURL=index.mjs.map
|