Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspoehls committed Nov 6, 2023
1 parent 37803d9 commit dd95e6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ npm i @supercharge/queue-datastructure
```


## Notice
This package is ESM-only.


## Usage
Using the queue data structure is pretty straightforward. The library exposes a `Queue` class that you can use to create a queue instance. You can create a queue from existing data or an empty one:

```js
const Queue = require('@supercharge/queue-datastructure')
import { Queue } from '@supercharge/queue-datastructure'

// create a queue from an existing array
const queue = new Queue([ 1, 2, 3 ])
Expand Down

0 comments on commit dd95e6b

Please sign in to comment.