source: imaps-frontend/node_modules/react-use/esm/misc/util.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 625 bytes
Line 
1export var noop = function () { };
2export function on(obj) {
3 var args = [];
4 for (var _i = 1; _i < arguments.length; _i++) {
5 args[_i - 1] = arguments[_i];
6 }
7 if (obj && obj.addEventListener) {
8 obj.addEventListener.apply(obj, args);
9 }
10}
11export function off(obj) {
12 var args = [];
13 for (var _i = 1; _i < arguments.length; _i++) {
14 args[_i - 1] = arguments[_i];
15 }
16 if (obj && obj.removeEventListener) {
17 obj.removeEventListener.apply(obj, args);
18 }
19}
20export var isBrowser = typeof window !== 'undefined';
21export var isNavigator = typeof navigator !== 'undefined';
Note: See TracBrowser for help on using the repository browser.