flexdinesh / flexdinesh/browser-or-node

[BUG] `isJsDom` should not be true when node v21.1.0

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
251
Forks
20
PR merge metrics
No merged PRs in 30d

Description

https://github.com/flexdinesh/browser-or-node/blob/9875469e69b0dbc6a35e50b104495facf869bb4a/src/index.js#L18-L22

```sh
$ node
Welcome to Node.js v21.1.0.
Type ".help" for more information.
>
> isJsDom =
... (typeof window !== "undefined" && window.name === "nodejs") ||
... (typeof navigator !== "undefined" &&
... (navigator.userAgent.includes("Node.js") ||
... navigator.userAgent.includes("jsdom")));
true
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.