1.0.6 • Published 5 years ago

stack-simple v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Stack data structure implementation

Usage

const LIFO = require('stack-simple');
const stack = new LIFO(); // creates a stack object
stack.push(node); // appends a node to stack
stack.pop(node); // removes a node from stack and returns its value

Examples

const LIFO = require('stack-simple');
const stack = new LIFO();
stack.push([7, 8]);
stack.push(99);
stack.push('good');
stack.push('night');
stack.pop(); // 'night'
stack.pop(); // 'good'
stack.pop(); // 99
stack.pop(); // [7, 8]

Install

$ npm install stack-simple

License

ISC

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago