Skip to content

@utilslib/node/isNode

isNode

函数签名

typescript
function isNode()

返回值

boolean

点击查看源码
js
export function isNode() {
  return (
    Object.prototype.toString.call(
      typeof process !== "undefined" ? process : 0,
    ) === "[object process]"
  );
}
ts
export function isNode() {
  return (
    Object.prototype.toString.call(
      typeof process !== "undefined" ? process : 0,
    ) === "[object process]"
  );
}

如有错误,请提交issue :::