0.0.2 • Published 7 years ago

lenkapenka-stack v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Build Status Dependency Status Coverage Status

Stack

Simple stack implementation in JavaScript

How to develop

git clone git@github.com:eseredova/lenkapenka-stack.git
cd lenkapenka-stack
npm install

API

const Stack = require('lenkapenka-stack');
const stack = new Stack();

//adds a new element onto the top of the stack
stack.push(value)
//removes the element from the top of the stack
stack.pop()
//returns the element from the top of the stack
stack.peek()
//returns true if stack is empty, false otherwise
stack.isEmpty()