is-global-object
Version:
Returns true if a value is the global or window object.
23 lines (14 loc) • 413 B
Markdown
true if a value is the `global` or `window` object of the current context.
Requires [Node.js](https://nodejs.org/) 4.0.0 or above.
```bash
npm install is-global-object --save
```
The module exports a single function.
```javascript
const isGlobalObject = require('is-global-object')
isGlobalObject(global) // true
isGlobalObject({}) // false
```
Returns