Skip to content

Commit ccb579c

Browse files
committed
update readme
1 parent bdb6f30 commit ccb579c

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,27 @@ var array = [];
3333
while (queue.length) array.push(queue.pop());
3434
```
3535

36-
Install as an NPM module:
36+
For a faster number-based queue, see [flatqueue](https://github.com/mourner/flatqueue).
3737

38-
```bash
39-
$ npm install tinyqueue
38+
### Install
39+
40+
Install using NPM (`npm install tinyqueue`) or Yarn (`yarn add tinyqueue`), then:
41+
42+
```js
43+
// import as an ES module
44+
import TinyQueue from 'tinyqueue';
45+
46+
// or require in Node / Browserify
47+
const TinyQueue = require('tinyqueue');
4048
```
4149

42-
Make a browser build using Browserify:
50+
Or use a browser build directly:
4351

44-
```bash
45-
$ npm install -g browserify
46-
$ browserify index.js -s TinyQueue > tinyqueue.js
52+
```html
53+
<script src="https://unpkg.com/[email protected]/tinyqueue.min.js"></script>
4754
```
4855

56+
### Thanks
57+
4958
Inspired by [js-priority-queue](https://github.com/adamhooper/js-priority-queue)
5059
by [Adam Hooper](https://github.com/adamhooper).

0 commit comments

Comments
 (0)