{"id":15790745,"url":"https://github.com/creativenull/deckjs","last_synced_at":"2026-01-20T13:01:28.092Z","repository":{"id":46858551,"uuid":"273540176","full_name":"creativenull/deckjs","owner":"creativenull","description":"A simple card deck library written in TypeScript","archived":false,"fork":false,"pushed_at":"2024-04-03T17:14:05.000Z","size":273,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-29T01:53:03.636Z","etag":null,"topics":["card","deck","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creativenull.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-19T16:32:02.000Z","updated_at":"2024-09-18T02:09:52.000Z","dependencies_parsed_at":"2024-10-26T04:09:01.158Z","dependency_job_id":"3e9fe029-b467-49fc-934d-7b4745dcf5a9","html_url":"https://github.com/creativenull/deckjs","commit_stats":{"total_commits":62,"total_committers":5,"mean_commits":12.4,"dds":0.4838709677419355,"last_synced_commit":"70a6192bfe70d9c2666f6d754e8f8e46ef518fc5"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/creativenull/deckjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativenull%2Fdeckjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativenull%2Fdeckjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativenull%2Fdeckjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativenull%2Fdeckjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativenull","download_url":"https://codeload.github.com/creativenull/deckjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativenull%2Fdeckjs/sbom","scorecard":{"id":308230,"data":{"date":"2025-08-11","repo":{"name":"github.com/creativenull/deckjs","commit":"b351b3aa42d70f10714eae4928e618e2a2ef909c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/22 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":"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":"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":"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":"Security-Policy","score":0,"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"],"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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 8 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":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-8jhw-289h-jh2g","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq"],"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-17T22:37:00.113Z","repository_id":46858551,"created_at":"2025-08-17T22:37:00.113Z","updated_at":"2025-08-17T22:37:00.113Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["card","deck","javascript","typescript"],"created_at":"2024-10-04T22:40:26.875Z","updated_at":"2026-01-20T13:01:28.069Z","avatar_url":"https://github.com/creativenull.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deck.js\n\nA simple card deck library written in TypeScript.\n\n## Installation\n\n```sh\nnpm install @creativenull/deckjs\n```\n\n### Deno\n\n```ts\nimport { Deck } from \"jsr:@creativenull/deckjs@2\"\n```\n\n## Test\n\n```sh\nnpm run test\n```\n\n# Documentation\n\n## Create a new deck\n\nCreate a newly shuffled deck\n\n```ts\nimport { Deck } from \"@creativenull/deckjs\"\n\nconst deck = new Deck();\n```\n\nBy default, you get a shuffled deck, to get a sorted deck pass `false` when\ncreating new `Deck` or call `deck.sort()`.\n\n```ts\nimport { Deck } from \"@creativenull/deckjs\"\n\n// Sorted deck\nconst deck = new Deck(false);\n\n// OR\nconst sortedDeck = deck.sort();\n```\n\n## Get cards from the deck\n\nGet the cards from the deck by calling the `getCards` method and providing an amount.\nIf no amount was given then it will return an empty array.\n\n```ts\n// Get 5 cards from the deck\nconst cards = deck.getCards(5); // [{ id: 22, value: '8', rank: 8, suit: {...} }, ...]\n```\n\n## Serialize/Deserialize cards\n\nIf you want to pass the cards around different components and but want to pass data without\nthe heavy object array, you can serialize it and then parse it later on.\n\nUse the static methods to stringify/parse the cards. Note: we are using the class name `Deck`\nand not a class instance.\n\n```ts\n// Serialize/Stringify\nconst cardsSerialize = Deck.stringify(cards); // ['22#8H', '99#3D', ...]\n\n// Deserialize/Parse\nconst cardsParsed = Deck.parse(cardsSerialize);\n// output: [{ id: 22, value: '8', rank: 8, suit: {...} }, {...}, ...]\n```\n\n## Get Text instance of a card\n\nUsing the card object we can get the text equivalent of a card.\n\n```ts\nconst oneCard = deck.getCards(1);\nconst cardText = Deck.getCardText(oneCard); // 'Four'\n```\n\nWe can get the Suit text as well.\n\n```ts\nconst suitText = Deck.getSuitText(oneCard); // 'Spades'\n```\n\nAnd finally we can get the card description.\n\n```ts\nconst cardDesc = Deck.getCardDescription(oneCard); // 'Four of Spades'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativenull%2Fdeckjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativenull%2Fdeckjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativenull%2Fdeckjs/lists"}