@apollo/utils.isnodelike
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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");
}

Package Sidebar

Install

npm i @apollo/utils.isnodelike

Weekly Downloads

947,958

Version

3.0.0

License

MIT

Unpacked Size

3.27 kB

Total Files

8

Last publish

Collaborators

  • dkuc
  • glasser
  • trevor.scheer
  • apollo-bot