Skip to content

Commit 35e5138

Browse files
authored
Add support for 'is.chrome' joeltankam#31
1 parent c7f2879 commit 35e5138

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/is/types.js

+8
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ export function isWindowObject(value) {
125125
return value != null && typeof value === 'object' && 'setInterval' in value;
126126
}
127127

128+
/**
129+
* Returns whether the current browser is Chrome
130+
*/
131+
export function isChrome() {
132+
return !!window.chrome && !!window.chrome.webstore;
133+
}
134+
128135
export default {
129136
object: isObject,
130137
array: isArray,
@@ -142,4 +149,5 @@ export default {
142149
regexp: isRegexp,
143150
undefined: isUndefined,
144151
windowObject: isWindowObject,
152+
chrome: isChrome,
145153
};

0 commit comments

Comments
 (0)