{"id":15662593,"url":"https://github.com/blakeembrey/deque","last_synced_at":"2025-10-10T03:37:01.643Z","repository":{"id":46941024,"uuid":"148082069","full_name":"blakeembrey/deque","owner":"blakeembrey","description":"JavaScript implementation of a double-ended queue","archived":false,"fork":false,"pushed_at":"2023-12-07T08:05:26.000Z","size":675,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-21T04:49:57.872Z","etag":null,"topics":["deque","dequeue","double-linked-list","iterator","linked-list","queue","stack"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blakeembrey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-10T01:24:34.000Z","updated_at":"2023-12-28T07:02:53.000Z","dependencies_parsed_at":"2024-06-18T19:48:31.931Z","dependency_job_id":"e769ba3b-f339-45f2-b26e-5d5ec30fea28","html_url":"https://github.com/blakeembrey/deque","commit_stats":{"total_commits":38,"total_committers":3,"mean_commits":"12.666666666666666","dds":0.368421052631579,"last_synced_commit":"0f1c140ca7ff1dde7b89db47c965c100234a2b8c"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/blakeembrey/deque","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakeembrey%2Fdeque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakeembrey%2Fdeque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakeembrey%2Fdeque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakeembrey%2Fdeque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blakeembrey","download_url":"https://codeload.github.com/blakeembrey/deque/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakeembrey%2Fdeque/sbom","scorecard":{"id":242567,"data":{"date":"2025-08-11","repo":{"name":"github.com/blakeembrey/deque","commit":"c1d5001def01d2f6150260fc2c779d021ef3e0f1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"42 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-3f95-r44v-8mrg","Warn: Project is vulnerable to: GHSA-28xr-mwxg-3qc8","Warn: Project is vulnerable to: GHSA-9p95-fxvg-qgq2","Warn: Project is vulnerable to: GHSA-9w5j-4mwv-2wj8","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T06:55:26.910Z","repository_id":46941024,"created_at":"2025-08-17T06:55:26.910Z","updated_at":"2025-08-17T06:55:26.910Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002620,"owners_count":26083425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deque","dequeue","double-linked-list","iterator","linked-list","queue","stack"],"created_at":"2024-10-03T13:33:28.232Z","updated_at":"2025-10-10T03:37:01.628Z","avatar_url":"https://github.com/blakeembrey.png","language":"TypeScript","readme":"# Deque\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n\n\u003e Deques are a generalization of stacks and queues (the name is pronounced \"deck\" and is short for \"double-ended queue\").\n\u003e -- [Python `collections`](https://docs.python.org/3/library/collections.html#collections.deque).\n\n## Installation\n\n```\nnpm install @blakeembrey/deque --save\n```\n\n## Usage\n\n- `size` Returns the number of elements in the deque.\n- `push(x)` Add `x` to right side of the deque.\n- `pushLeft(x)` Add `x` to the left side of the deque.\n- `clear()` Remove all elements from the deque leaving it with length 0.\n- `extend(iterable)` Extend the right side of the deque by appending elements from iterable.\n- `extendLeft(iterable)` Extend the left side of the deque by appending elements from iterable.\n- `peek(i)` Return the element at index `i` in the deque.\n- `indexOf(x, start?)` Return the position of `x` in the deque.\n- `has(x)` Return a boolean indicating whether `x` is in the deque.\n- `insert(i, x)` Insert `x` into the deque at position `i`.\n- `pop()` Remove and return an element from the right side of the deque. If no elements are present, throws `RangeError`.\n- `popLeft()` Return and return an element from the left side of the deque. If no elements are present, throws `RangeError`.\n- `delete(i)` Delete the value at position `i`.\n- `reverse()` Reverse the elements of the deque in-place.\n- `rotate(n=1)` Rotate the deque `n` steps to the right.\n- `entries()` Return an iterable of deque.\n- `@@iterator()` Return an iterable of deque.\n\n```js\nimport { Deque } from '@blakeembrey/deque'\n\nconst d = new Deque('ghi')\n\nfor (const value of d) {\n  console.log(value.toUpperCase()) //=\u003e G H I\n}\n\nd.push('j')\nd.pushLeft('f')\nd //=\u003e Deque(['f', 'g', 'h', 'i', 'j'])\n\nd.pop() //=\u003e 'j'\nd.popLeft() //=\u003e 'f'\n\nArray.from(d) //=\u003e ['g', 'h', 'i']\n\nd.peek(0) //=\u003e 'g'\nd.peek(-1) //=\u003e 'i'\n\nd.extend('jkl')\nd //=\u003e Deque(['g', 'h', 'i', 'j', 'k', 'l'])\n\nd.rotate(1)\nd //=\u003e Deque(['l', 'g', 'h', 'i', 'j', 'k'])\n\nd.rotate(-1)\nd //=\u003e Deque(['g', 'h', 'i', 'j', 'k', 'l'])\n\nconst d2 = new Deque(d)\n\nd2 //=\u003e Deque(['g', 'h', 'i', 'j', 'k', 'l'])\n```\n\n## TypeScript\n\nThis project uses [TypeScript](https://github.com/Microsoft/TypeScript) and publishes definitions on NPM.\n\n## Reference\n\nCircular array implementation originally based on [`denque`](https://github.com/Salakar/denque) with additional optimizations.\n\n## License\n\nApache 2.0\n\n[npm-image]: https://img.shields.io/npm/v/@blakeembrey/deque.svg?style=flat\n[npm-url]: https://npmjs.org/package/@blakeembrey/deque\n[downloads-image]: https://img.shields.io/npm/dm/@blakeembrey/deque.svg?style=flat\n[downloads-url]: https://npmjs.org/package/@blakeembrey/deque\n[travis-image]: https://img.shields.io/travis/blakeembrey/deque.svg?style=flat\n[travis-url]: https://travis-ci.org/blakeembrey/deque\n[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/deque.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/blakeembrey/deque?branch=master\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakeembrey%2Fdeque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakeembrey%2Fdeque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakeembrey%2Fdeque/lists"}