Installations
npm install @js-sdsl/priority-queue
Developer Guide
Typescript
Yes
Module System
CommonJS
Score
73
Supply Chain
99.4
Quality
77.9
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (99.93%)
Shell (0.07%)
Developer
Download Statistics
Total Downloads
8,418
Last Day
6
Last Week
60
Last Month
401
Last Year
5,034
GitHub Statistics
769 Stars
501 Commits
61 Forks
24 Watching
10 Branches
4 Contributors
Bundle Size
2.80 kB
Minified
1.20 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
4.4.0
Package Id
@js-sdsl/priority-queue@4.4.0
Unpacked Size
150.78 kB
Size
32.23 kB
File Count
19
Publised On
22 Mar 2023
Total Downloads
Cumulative downloads
Total Downloads
8,418
Last day
200%
6
Compared to previous day
Last week
-31.8%
60
Compared to previous week
Last month
-25.7%
401
Compared to previous month
Last year
77.9%
5,034
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
73
A javascript standard data structure library which benchmark against C++ STL
English | 简体中文
✨ Included data structures
- Stack - first in last out stack.
- Queue - first in first out queue.
- PriorityQueue - heap-implemented priority queue.
- Vector - protected array, cannot to operate properties like
length
directly. - LinkList - linked list of non-contiguous memory addresses.
- Deque - double-ended-queue, O(1) time complexity to
unshift
or getting elements by index. - OrderedSet - sorted set which implemented by red black tree.
- OrderedMap - sorted map which implemented by red black tree.
- HashSet - refer to the polyfill of ES6 Set.
- HashMap - refer to the polyfill of ES6 Map.
⚔️ Benchmark
We are benchmarking against other popular data structure libraries. In some ways we're better than the best library. See benchmark.
🖥 Supported platforms
IE / Edge | Firefox | Chrome | Safari | Opera | NodeJs |
---|---|---|---|---|---|
Edge 12 | 36 | 49 | 10 | 36 | 10 |
📦 Download
Download directly by cdn:
- js-sdsl.js (for development)
- js-sdsl.min.js (for production)
Or install js-sdsl using npm:
1npm install js-sdsl
Or you can download the isolation packages containing only the containers you want:
🪒 Usage
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.org/js-sdsl/previous/v${version}/index.html
E.g.
https://js-sdsl.org/js-sdsl/previous/v4.1.5/index.html
For browser
1<script src="https://unpkg.com/js-sdsl/dist/umd/js-sdsl.min.js"></script> 2<script> 3 const { 4 Vector, 5 Stack, 6 Queue, 7 LinkList, 8 Deque, 9 PriorityQueue, 10 OrderedSet, 11 OrderedMap, 12 HashSet, 13 HashMap 14 } = sdsl; 15 const myOrderedMap = new OrderedMap(); 16 myOrderedMap.setElement(1, 2); 17 console.log(myOrderedMap.getElementByKey(1)); // 2 18</script>
For npm
1// esModule 2import { OrderedMap } from 'js-sdsl'; 3// commonJs 4const { OrderedMap } = require('js-sdsl'); 5const myOrderedMap = new OrderedMap(); 6myOrderedMap.setElement(1, 2); 7console.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.
For performance
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.
⌨️ Development
Use Gitpod, a free online dev environment for GitHub.
Or clone locally:
1$ git clone https://github.com/js-sdsl/js-sdsl.git 2$ cd js-sdsl 3$ npm install 4$ npm run dev # development mode
Then you can see the output in dist/cjs
folder.
🤝 Contributing
Feel free to dive in! Open an issue or submit PRs. It may be helpful to read the Contributor Guide.
Contributors
Thanks goes to these wonderful people:
Takatoshi Kondo 💻 ⚠️ | noname 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
❤️ Sponsors and Backers
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:
🪪 License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
SAST tool detected but not run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Warn: 0 commits out of 30 are checked with a SAST tool
Reason
Found 8/29 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:34
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:35
- Warn: no topLevel permission defined: .github/workflows/build.yml:1
- Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1
- Warn: no topLevel permission defined: .github/workflows/compressed-size.yml:1
- Warn: no topLevel permission defined: .github/workflows/deploy-preview.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:135: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:140: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/codeql-analysis.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/compressed-size.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/compressed-size.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/compressed-size.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/compressed-size.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-preview.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/deploy-preview.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy-preview.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/deploy-preview.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy-preview.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/deploy-preview.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/lint.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/lint.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:117: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:130: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/js-sdsl/js-sdsl/test.yml/main?enable=pin
- Info: 0 out of 36 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 12 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
16 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-x3m3-4wpv-5vgc
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3.4
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @js-sdsl/priority-queue
js-sdsl
javascript standard data structure library which benchmark against C++ STL
@js-sdsl/queue
javascript standard data structure library which benchmark against C++ STL
@js-sdsl/vector
javascript standard data structure library which benchmark against C++ STL
@js-sdsl/deque
javascript standard data structure library which benchmark against C++ STL