source: trip-planner-front/node_modules/rxjs/internal/operators/last.js@ 76712b2

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

initial commit

  • Property mode set to 100644
File size: 826 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var EmptyError_1 = require("../util/EmptyError");
4var filter_1 = require("./filter");
5var takeLast_1 = require("./takeLast");
6var throwIfEmpty_1 = require("./throwIfEmpty");
7var defaultIfEmpty_1 = require("./defaultIfEmpty");
8var identity_1 = require("../util/identity");
9function last(predicate, defaultValue) {
10 var hasDefaultValue = arguments.length >= 2;
11 return function (source) { return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); };
12}
13exports.last = last;
14//# sourceMappingURL=last.js.map
Note: See TracBrowser for help on using the repository browser.