amaui Stack
Stack
MIT license Production ready UMD 1.5kb gzipped 100% test cov Browser and Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with
Getting started
Add
// yarn
yarn add @amaui/stack
// npm
npm install @amaui/stack
Use cases
- Reversing
- Undo/redo
- Backtracking
- Call stack
- etc.
Use
import AmauiStack from '@amaui/stack';
// Make a new stack instance
const amauiStack = new AmauiStack();
// Add values
amauiStack.push(1, 2, 3, 4);
amauiStack.first;
// 1
amauiStack.length;
// 4
const value = amauiStack.pop();
value;
// 1
amauiStack.first;
// 2
amauiStack.length;
// 3
Dev
Install
yarn
Test
yarn test
Prod
Build
yarn build
Docs
Might be soon...