@kuzanatoliorg/algorithms
Version:
The utils package for react testing library
20 lines (19 loc) • 374 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Stack = void 0;
class Stack {
store;
constructor() {
this.store = [];
}
push(item) {
this.store.push(item);
}
pop() {
return this.store.pop() ?? null;
}
get length() {
return this.store.length;
}
}
exports.Stack = Stack;