An open API service indexing awesome lists of open source software.

https://github.com/thangved/stack-structure

A stack library
https://github.com/thangved/stack-structure

datastructure js stack

Last synced: 24 days ago
JSON representation

A stack library

Awesome Lists containing this project

README

          

# stack-structure

A stack library

## Usage

```js
import Stack from "stack-structure";

const stack = new Stack();
```

## Methods

| Name | Params | Return value |
| ----------- | ----------- | ------------------------------------ |
| top() | No params | `any`: element of top index |
| empty() | No params | `boolean`: check empty stack |
| push(x:any) | x: `number` | `void`: add `x` element to top stack |
| pop() | No params | `void`: remove top element of stack |

## Donation