Codibre/fluent-iterable-js-sdsl

View on GitHub
src/stack/iterable-stack.ts

Summary

Maintainability
A
1 hr
Test Coverage
import { Stack } from 'js-sdsl';

export class IterableStack<K> extends Stack<K> {
    *[Symbol.iterator]() {
        while (this.length > 0) {
            yield this.pop();
        }
    }
}