1 line
70 KiB
JSON
1 line
70 KiB
JSON
|
{"id":"../node_modules/rxjs/_esm5/internal/observable/fromEvent.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/fromEvent.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/observable/fromEvent.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395695572},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/package.json","includedInParent":true,"mtime":1545395355370},{"name":"../Observable","loc":{"line":2,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/fromEvent.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Observable.js"},{"name":"../util/isArray","loc":{"line":3,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/fromEvent.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/isArray.js"},{"name":"../util/isFunction","loc":{"line":4,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/fromEvent.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/isFunction.js"},{"name":"../operators/map","loc":{"line":5,"column":20},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/fromEvent.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/map.js"}],"generated":{"js":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fromEvent = fromEvent;\n\nvar _Observable = require(\"../Observable\");\n\nvar _isArray = require(\"../util/isArray\");\n\nvar _isFunction = require(\"../util/isFunction\");\n\nvar _map = require(\"../operators/map\");\n\n/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nvar toString = Object.prototype.toString;\n\nfunction fromEvent(target, eventName, options, resultSelector) {\n if ((0, _isFunction.isFunction)(options)) {\n resultSelector = options;\n options = undefined;\n }\n\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe((0, _map.map)(function (args) {\n return (0, _isArray.isArray)(args) ? resultSelector.apply(void 0, args) : resultSelector(args);\n }));\n }\n\n return new _Observable.Observable(function (subscriber) {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n } else {\n subscriber.next(e);\n }\n }\n\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\n\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n var unsubscribe;\n\n if (isEventTarget(sourceObj)) {\n var source_1 = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n\n unsubscribe = function () {\n return source_1.removeEventListener(eventName, handler, options);\n };\n } else if (isJQueryStyleEventEmitter(sourceObj)) {\n var source_2 = sourceObj;\n sourceObj.on(eventName, handler);\n\n unsubscribe = function () {\n return source_2.off(eventName, handler);\n };\n } else if (isNodeStyleEventEmitter(sourceObj)) {\n var source_3 = sourceObj;\n sourceObj.addListener(eventName, handler);\n\n unsubscribe = function () {\n return source_3.removeListener(eventName, handler);\n };\n } else if (sourceObj && sourceObj.length) {\n for (var i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n } else {\n throw new TypeError('Invalid event tar
|