Initial commit - Event Planner application

This commit is contained in:
mberlin
2026-03-18 14:55:56 -03:00
commit 86d779eb4d
7548 changed files with 1006324 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { EMPTY } from '../observable/empty';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function takeLast(count) {
return count <= 0
? () => EMPTY
: operate((source, subscriber) => {
let buffer = [];
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
buffer.push(value);
count < buffer.length && buffer.shift();
}, () => {
for (const value of buffer) {
subscriber.next(value);
}
subscriber.complete();
}, undefined, () => {
buffer = null;
}));
});
}
//# sourceMappingURL=takeLast.js.map