1.0.0 • Published 1 year ago
@amaui/queue v1.0.0
Getting started
Add
// yarn
yarn add @amaui/queue
// npm
npm install @amaui/queue
Use cases
- First come, first serve, use cases
- CPU Scheduling
- Memory management
- Website requests handling on the server
- Routers and switches in networking
- etc.
Use
import AmauiQueue from '@amaui/queue';
// Make a new queue instance
const amauiQueue = new AmauiQueue();
// Add values
amauiQueue.push(1, 2, 3, 4);
amauiQueue.first;
// 1
amauiQueue.length;
// 4
const value = amauiQueue.pop();
value;
// 1
amauiQueue.first;
// 2
amauiQueue.length;
// 3
Dev
Install
yarn
Test
yarn test
Prod
Build
yarn build
Docs
Might be soon...
1.0.0
1 year ago