File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,27 @@ var array = [];
3333while (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+
4958Inspired by [ js-priority-queue] ( https://github.com/adamhooper/js-priority-queue )
5059by [ Adam Hooper] ( https://github.com/adamhooper ) .
You can’t perform that action at this time.
0 commit comments