Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@js-sdsl/ordered-map
Advanced tools
Changelog
[4.2.0-beta.0] - 2022.10.30
ts
sourcemap for debug mode.this
param for forEach
function.Readme
A javascript standard data structure library which benchmark against C++ STL
English | 简体中文
length
directly.We are benchmarking against other popular data structure libraries. In some ways we're better than the best library. See benchmark.
IE / Edge
|
Firefox
|
Chrome
|
Safari
|
Opera
|
NodeJs
|
Edge 12 | 31 | 49 | 10 | 36 | 10 |
Download directly by cdn:
Or install js-sdsl using npm:
npm install js-sdsl
Or you can download the isolation packages containing only the containers you want:
package | npm | install |
---|---|---|
@js-sdsl/stack | npm i @js-sdsl/stack | |
@js-sdsl/queue | npm i @js-sdsl/queue | |
@js-sdsl/priority-queue | npm i @js-sdsl/priority-queue | |
@js-sdsl/vector | npm i @js-sdsl/vector | |
@js-sdsl/link-list | npm i @js-sdsl/link-list | |
@js-sdsl/deque | npm i @js-sdsl/deque | |
@js-sdsl/ordered-set | npm i @js-sdsl/ordered-set | |
@js-sdsl/ordered-map | npm i @js-sdsl/ordered-map | |
@js-sdsl/hash-set | npm i @js-sdsl/hash-set | |
@js-sdsl/hash-map | npm i @js-sdsl/hash-map |
You 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.github.io/js-sdsl/previous/v${version}/index.html
E.g.
https://js-sdsl.github.io/js-sdsl/previous/v4.1.5/index.html
<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>
// 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
We use jest library to write unit tests, you can see test coverage on 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.
Use Gitpod, a free online dev environment for GitHub.
Or clone locally:
$ git clone https://github.com/js-sdsl/js-sdl.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.
Thanks goes to these wonderful people:
Takatoshi Kondo 💻 ⚠️ | noname 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
The special thanks to these sponsors or backers because they provided support at a very early stage:
Thanks also give to these sponsors or backers:
FAQs
javascript standard data structure library which benchmark against C++ STL
We found that @js-sdsl/ordered-map demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).