A javascript standard data structure library which benchmark against C++ STL
English | ç®ä½ä¸æ
⨠Included data structureslength
directly.unshift
or getting elements by index.We are benchmarking against other popular data structure libraries. In some ways we're better than the best library. See benchmark.
ð¥ Supported platforms ð¦ DownloadDownload directly by cdn:
Or install js-sdsl using npm:
Or you can download the isolation packages containing only the containers you want:
ðª UsageYou can visit our official website to get more information.
To help you have a better use, we also provide this API document.
For previous versions of the documentation, please visit:
https://js-sdsl.org/js-sdsl/previous/v${version}/index.html
E.g.
https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html
For browser<script src="https://unpkg.com/js-sdsl/dist/umd/js-sdsl.min.js"></script> <script> const { Vector, Stack, Queue, LinkList, Deque, PriorityQueue, OrderedSet, OrderedMap, HashSet, HashMap } = sdsl; const myOrderedMap = new OrderedMap(); myOrderedMap.setElement(1, 2); console.log(myOrderedMap.getElementByKey(1)); // 2 </script>For npm
// esModule import { OrderedMap } from 'js-sdsl'; // commonJs const { OrderedMap } = require('js-sdsl'); const myOrderedMap = new OrderedMap(); myOrderedMap.setElement(1, 2); console.log(myOrderedMap.getElementByKey(1)); // 2ð Test Unit test
We use karma and mocha frame to do unit tests and synchronize to coveralls. You can run yarn test:unit
command to reproduce it.
We tested most of the functions for efficiency. You can go to gh-pages/performance.md
to see our running results or reproduce it with yarn test:performance
command.
You can also visit here to get the result.
â¨ï¸ DevelopmentUse Gitpod, a free online dev environment for GitHub.
Or clone locally:
$ git clone https://github.com/js-sdsl/js-sdsl.git $ cd js-sdsl $ npm install $ npm run dev # development mode
Then you can see the output in dist/cjs
folder.
Feel free to dive in! Open an issue or submit PRs. It may be helpful to read the Contributor Guide.
ContributorsThanks goes to these wonderful people:
This project follows the all-contributors specification. Contributions of any kind welcome!
â¤ï¸ Sponsors and BackersThe special thanks to these sponsors or backers because they provided support at a very early stage:
Thanks also give to these sponsors or backers:
𪪠LicenseRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4