@amaui/stack
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

amaui logo

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...

Package Sidebar

Install

npm i @amaui/stack

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

20.4 kB

Total Files

11

Last publish

Collaborators

  • lazareric