stack-str

1.1.0 • Public • Published

stack-str

A complete implementation of the stack data structure :-)

Instalation

npm install stack-str

Usage

var stack = require("stack-str");
var numbers = new stack();
numbers.push(1); 
console.log(numbers) // [1];
 
numbers.push(2, 3, 4, 5, 7);
console.log(numbers) // [1, 2, 3, 4, 5, 7];
 
numbers.pop();
console.log(numbers) //[1, 2, 3, 4, 5];
 
numbers.isEmpty() //false
numbers.empty();
numbers.isEmpty() // true
 
numbers.push(8, 9, 10);
console.log(numbers.peek()) //10

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    3
  • 1.0.0
    0

Package Sidebar

Install

npm i stack-str

Weekly Downloads

3

Version

1.1.0

License

ISC

Last publish

Collaborators

  • jsenor