{"id":20820732,"url":"https://github.com/webdad/lib-gs-cards","last_synced_at":"2025-10-10T03:03:47.540Z","repository":{"id":143885822,"uuid":"117813726","full_name":"WebDaD/lib-gs-cards","owner":"WebDaD","description":"A Part of the gamingsimulator. Module Representing Cards and a Deck of Cards","archived":false,"fork":false,"pushed_at":"2018-01-18T08:24:30.000Z","size":926,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T10:42:53.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebDaD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-17T09:22:56.000Z","updated_at":"2018-01-17T10:17:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"810c4092-a385-4c51-bbc0-45e067600a40","html_url":"https://github.com/WebDaD/lib-gs-cards","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"03f2b5be021fe43df9872fbbd8659ca15213ac0a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WebDaD/lib-gs-cards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDaD%2Flib-gs-cards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDaD%2Flib-gs-cards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDaD%2Flib-gs-cards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDaD%2Flib-gs-cards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebDaD","download_url":"https://codeload.github.com/WebDaD/lib-gs-cards/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDaD%2Flib-gs-cards/sbom","scorecard":{"id":150218,"data":{"date":"2025-08-11","repo":{"name":"github.com/WebDaD/lib-gs-cards","commit":"03f2b5be021fe43df9872fbbd8659ca15213ac0a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/4 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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: The Unlicense: LICENSE.md:0"],"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":"Vulnerabilities","score":0,"reason":"43 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-p9wx-2529-fp83","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","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-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-mvjj-gqq2-p4hw","Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-qgmg-gppg-76g5","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","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-16T10:26:20.742Z","repository_id":143885822,"created_at":"2025-08-16T10:26:20.742Z","updated_at":"2025-08-16T10:26:20.742Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002534,"owners_count":26083417,"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":[],"created_at":"2024-11-17T22:09:59.461Z","updated_at":"2025-10-10T03:03:47.522Z","avatar_url":"https://github.com/WebDaD.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lib-gs-cards\n\nA Part of the gamingsimulator. Module Representing Cards and a Deck of Cards.\n\n## Installation\n\n... is as simple as `npm install lib-gs-cards`\n\n## Usage\n\nFirst, require the Modules:\n\n`const deck = require('lib-gs-cards/dist/deck')`\n\n`const card = require('lib-gs-cards/dist/card')`\n\n`const hand = require('lib-gs-cards/dist/hand')`\n\nor ES6 Style:\n\n`import Deck from 'lib-gs-cards/dist/src/deck'`\n`import Card, Value, Suit from 'lib-gs-cards/dist/src/card'`\n`import Hand from 'lib-gs-cards/dist/src/hand'`\n\n### The Card\n\nYou May Create a Card:\n\n`let myCard= new Card(Value.Ace, Suit.Spades)`\n\nor draw one form the Deck or get one form the hand...\n\nThen you may:\n\n#### Get The Value of the Card as Number\n\n`var value: number = myCard.valueOf()`\n\nEasy as that. Ace counts 1, 10/J/Q/K counts 10\n\n### The Deck\n\nAfter That, create a new Deck:\n\n`let myDeck = new Deck()`\n\nThen you may perform the following actions:\n\n#### Shuffle Deck\n\n`myDeck.shuffle()`\n\nNow the Cards are in a random Order\n\n#### Get Number of Cards in Deck\n\n`myDeck.cardsInDeck()`\n\nHow many Cards are left in my deck?\n\n#### Draw A Card\n\n`let Card = myDeck.draw()`\n\nReturns a Card Object and reduces the Deck by this Card\n\n#### Peek\n\n`let Card = myDeck.peek()`\n\nReturns a Card Object and does not alter the deck\n\n#### Add a Card\n\n`myDeck.add(new Card(Value.Ace, Suit.Spades))`\n\nAllows to Add Any Card to the Deck\n\n#### Refill the Deck\n\n`myDeck.refill()`\n\nAdds all 52 Cards to the Deck. Even if not empty yet.\n\n### The Hand\n\nThe Hand is the Players Stack. Create One:\n\n`let myHand = new Hand()`\n\nThen you may:\n\n#### List all Cards\n\nReturns an Array of Cards:\n\n`let cards: Card[] = myHand.list()`\n\n#### Get Number of Cards in Hand\n\n`myHand.cardsInHand()`\n\nHow many Cards are left in my hand?\n\n#### Look at a Card\n\nReturns the Card, not altering the Hand:\n\n`let card: Card = myHand.look(index)`\n\n#### Play a Card\n\nReturns the Card, removing it from the Hand:\n\n`let card: Card = myHand.play(index)`\n\n#### Add a Card to the Hand\n\n`myHand.add(new Card(Value.Ace, Suit.Spades))`\n\nAllows to Add Any Card to the Hand\n\n## Dependencies\n\nNone. Yet.\n\n## Documentation for Developers\n\nHere be Some Infos to make this even better.\n\n### Libs\n\nClassDiagram:\n\n![The diagram](https://github.com/WebDaD/lib-gs-cards/raw/master/docs/classDiagram.png \"The class Diagram\")\n\nCan be found in docs/classDiagram.png\n\nAlso as editable plantUML-File.\n\nJSDOC. See also HTML Version @ docs/jsdoc/index.html\n\n### Tests\n\nThe Tests are written using the assert-class and can be found in the tests-folder\n\nYou may use your favorite Test-Runner to do them yourself.\n\nMy Commandline is as follows:\n\n`istanbul cover _mocha -- dist/tests/test.card.js dist/tests/test.deck.js dist/tests/test.hand.js -R mochawesome`\n\nOR\n\n`npm run test`\n\n#### Results\n\nCoverage: docs/coverage/lcov-report/index.html\nMochawesome-Report: docs/mochawesome-report/index.html\n\n### JSON\n\ndocs/card.schema.json\n\ndocs/deck.schema.json\n\ndocs/hand.schema.json\n\n## Authors\n\n* Dominik Sigmund \u003cdominik.sigmund@webdad.eu\u003e\n\n## License\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttp://unlicense.org/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdad%2Flib-gs-cards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdad%2Flib-gs-cards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdad%2Flib-gs-cards/lists"}