source: trip-planner-front/node_modules/rxjs/internal/operators/elementAt.js@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 900 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var ArgumentOutOfRangeError_1 = require("../util/ArgumentOutOfRangeError");
4var filter_1 = require("./filter");
5var throwIfEmpty_1 = require("./throwIfEmpty");
6var defaultIfEmpty_1 = require("./defaultIfEmpty");
7var take_1 = require("./take");
8function elementAt(index, defaultValue) {
9 if (index < 0) {
10 throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError();
11 }
12 var hasDefaultValue = arguments.length >= 2;
13 return function (source) { return source.pipe(filter_1.filter(function (v, i) { return i === index; }), take_1.take(1), hasDefaultValue
14 ? defaultIfEmpty_1.defaultIfEmpty(defaultValue)
15 : throwIfEmpty_1.throwIfEmpty(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); })); };
16}
17exports.elementAt = elementAt;
18//# sourceMappingURL=elementAt.js.map
Note: See TracBrowser for help on using the repository browser.