3.0.0 • Published 1 year ago

@apollo/utils.isnodelike v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

isNodeLike

A simple constant to determine if the current environment is Node-like by inspecting the process global for Node-specific properties.

Usage

import { isNodeLike } from "@apollo/utils.isnodelike";

if (isNodeLike) {
  require("fs").readFileSync("foo");
}