Skip to content

isWindow

Check if value is a window object.

Usage

js
import { isWindow } from 'js-cool'

Signature

typescript
function isWindow(value: any): value is Window

Parameters

ParameterTypeDescription
valueanyValue to check

Returns

boolean - true if value is a window object.

Examples

js
isWindow(window) // true
isWindow({}) // false
isWindow(document) // false

Released under the MIT License.