UNPKG

eslint-plugin-ember

Version:
18 lines (17 loc) 301 B
module.exports = class Stack { constructor() { this.stack = new Array(); } pop() { return this.stack.pop(); } push(item) { this.stack.push(item); } peek() { return this.stack.length > 0 ? this.stack.at(-1) : undefined; } size() { return this.stack.length; } };