UNPKG
is-window
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
0.0.0
Checks if the given value is a window object.
github.com/gearcase/is-window
gearcase/is-window
is-window
/
index.js
13 lines
(8 loc)
•
146 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict'
;
module
.
exports
=
function
(
obj
) {
if
(obj ==
null
) {
return
false
; }
var
o =
Object
(obj);
return
o === o.
window
; };