source: imaps-frontend/node_modules/react-use/lib/misc/util.js

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

Update repo after prototype presentation

  • Property mode set to 100644
File size: 824 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isNavigator = exports.isBrowser = exports.off = exports.on = exports.noop = void 0;
4var noop = function () { };
5exports.noop = noop;
6function on(obj) {
7 var args = [];
8 for (var _i = 1; _i < arguments.length; _i++) {
9 args[_i - 1] = arguments[_i];
10 }
11 if (obj && obj.addEventListener) {
12 obj.addEventListener.apply(obj, args);
13 }
14}
15exports.on = on;
16function off(obj) {
17 var args = [];
18 for (var _i = 1; _i < arguments.length; _i++) {
19 args[_i - 1] = arguments[_i];
20 }
21 if (obj && obj.removeEventListener) {
22 obj.removeEventListener.apply(obj, args);
23 }
24}
25exports.off = off;
26exports.isBrowser = typeof window !== 'undefined';
27exports.isNavigator = typeof navigator !== 'undefined';
Note: See TracBrowser for help on using the repository browser.