UNPKG

is-global-object

Version:

Returns true if a value is the global or window object.

7 lines (4 loc) 160 B
'use strict' const g = typeof global !== 'undefined' const w = typeof window !== 'undefined' module.exports = x => (g && x === global) || (w && x === window)