webdetector/.cache/1c/bb43565ea77af33b4a485eeb9125c7.json

1 line
47 KiB
JSON
Raw Normal View History

2018-12-21 12:36:28 +00:00
{"id":"../node_modules/rxjs/_esm5/internal/operators/single.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/single.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/single.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":"tslib","loc":{"line":2,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/single.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/tslib/tslib.es6.js"},{"name":"../Subscriber","loc":{"line":3,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/single.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscriber.js"},{"name":"../util/EmptyError","loc":{"line":4,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/single.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/EmptyError.js"}],"generated":{"js":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.single = single;\n\nvar tslib_1 = _interopRequireWildcard(require(\"tslib\"));\n\nvar _Subscriber = require(\"../Subscriber\");\n\nvar _EmptyError = require(\"../util/EmptyError\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\n/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */\nfunction single(predicate) {\n return function (source) {\n return source.lift(new SingleOperator(predicate, source));\n };\n}\n\nvar SingleOperator =\n/*@__PURE__*/\nfunction () {\n function SingleOperator(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n\n SingleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n };\n\n return SingleOperator;\n}();\n\nvar SingleSubscriber =\n/*@__PURE__*/\nfunction (_super) {\n tslib_1.__extends(SingleSubscriber, _super);\n\n function SingleSubscriber(destination, predicate, source) {\n var _this = _super.call(this, destination) || this;\n\n _this.predicate = predicate;\n _this.source = source;\n _this.seenValue = false;\n _this.index = 0;\n return _this;\n }\n\n SingleSubscriber.prototype.applySingleValue = function (value) {\n if (this.seenValue) {\n this.destination.error('Sequence contains more than one element');\n } else {\n this.seenValue = true;\n this.singleValue = value;\n }\n };\n\n SingleSubscriber.prototype._next = function (value) {\n var index = this.index++;\n\n if (this.predicate) {\n this.tryNext(value, index);\n } else {\n this.applySingleValue(value);\n }\n };\n\n SingleSubscriber.prototype.tryNext = function (value, index) {\n try {\n if (this.predicate(value, index, this.source)) {\n this.applySingleValue(value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n };\n\n SingleSubscriber.prototype._complete = function () {\n var destination = this.destination;\n\n if (this.index > 0) {\n destination.next(th