{"id":15498675,"url":"https://github.com/jankapunkt/js-set-extension","last_synced_at":"2025-04-22T22:19:06.400Z","repository":{"id":33016735,"uuid":"149008977","full_name":"jankapunkt/js-set-extension","owner":"jankapunkt","description":"Extending the Set class in order to support mathematical set properties and operations.","archived":false,"fork":false,"pushed_at":"2023-07-20T14:16:40.000Z","size":1202,"stargazers_count":13,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T22:18:58.112Z","etag":null,"topics":["complement","difference","hacktoberfest","intersection","javascript","math","powerset","proper-subset","proper-superset","set","set-theory","subset","superset","symmetric-difference","union"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/set-extensions","language":"JavaScript","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/jankapunkt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["jankapunkt"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/kuesterjan"]}},"created_at":"2018-09-16T15:30:02.000Z","updated_at":"2025-02-11T01:16:11.000Z","dependencies_parsed_at":"2024-11-08T19:02:28.275Z","dependency_job_id":"58655aee-37e6-420b-9204-6985fb75a0b4","html_url":"https://github.com/jankapunkt/js-set-extension","commit_stats":{"total_commits":160,"total_committers":6,"mean_commits":"26.666666666666668","dds":"0.23750000000000004","last_synced_commit":"4009ba393410e64209fee8683efeab44b31e09e5"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankapunkt%2Fjs-set-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankapunkt%2Fjs-set-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankapunkt%2Fjs-set-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankapunkt%2Fjs-set-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jankapunkt","download_url":"https://codeload.github.com/jankapunkt/js-set-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250331816,"owners_count":21413104,"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","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":["complement","difference","hacktoberfest","intersection","javascript","math","powerset","proper-subset","proper-superset","set","set-theory","subset","superset","symmetric-difference","union"],"created_at":"2024-10-02T08:47:15.839Z","updated_at":"2025-04-22T22:19:06.375Z","avatar_url":"https://github.com/jankapunkt.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jankapunkt","https://paypal.me/kuesterjan"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/jankapunkt/js-set-extension/raw/master/logo.svg?sanitize=true\" width=\"50%\"/\u003e\n\u003ch1\u003eJavascript Set Extensions\u003c/h1\u003e\n\nPolyfill for extending the Javascript [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) class in order to support properties and operations from basic set theory.\n\n[![Test suite](https://github.com/jankapunkt/js-set-extension/actions/workflows/tests.yml/badge.svg)](https://github.com/jankapunkt/js-set-extension/actions/workflows/tests.yml)\n[![CodeQL Semantic Analysis](https://github.com/jankapunkt/js-set-extension/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/jankapunkt/js-set-extension/actions/workflows/codeql-analysis.yml)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n![npm bundle size](https://img.shields.io/bundlephobia/min/set-extensions.svg)\n![GitHub](https://img.shields.io/github/license/jankapunkt/js-set-extension.svg)\n\n\n## Scope\n\nPlease read this first, to a get a better understanding, whether this package suits your needs.\n\n### Completeness vs. Performance\n\nFocus of this package is to provide a Set implementation, which can be used in context of axiomatic set theory. \n\nSet's class Methods are primarily designed to\n\n* run with any values, but also values as Sets (of Sets, arbitrary depth)\n* work with arbitrary (but finite) numbers of sets (depending on operation, see documentation)\n* conform with their respective properties (Associative, Commutative etc.)\n* don't mutate any of the given but return a new Set as result\n\nSet's prototype Methods are in contrast designed to work as a binary operation on the current instance but they also won't mutate any of the involved Sets.\n\nSome algorithms may grow exponentially with a raising number of sets to be processes. \nPlease, see the documentation notes on the respective methods. \n\n### Extending `Set`\n\nThis package builds upon the `Set` implementation, instead of providing an own.\nSome suggest it's bad design to extend core implementations.\n\nHowever, the core functionality of `Set` is stable and proven and this\npackage tries to be minimally invasive on the `Set` implementation.\n\nPlease, leave an issue, in case this extension breaks your setup by\nwhatever unexpected or undefined behaviour.\n\n### Future Implementations\n\nCurrently, this package only supports finite sets. \nA future implementation could include generators to support infinite sets and function-based operations with infinite sets. Ideas.concepts and contributions are very welcomed.\n\n## Installation and Usage\n\nInstall this package as usual:\n\n```\n$ npm install --save set-extensions\n```\n\nImport this package in your startup code. \nThe package automatically extends the global `Set` object.\n\n```javascript\nimport 'set-extensions'\n```\n\nYou can verify the presence of this polyfill by checking for the `__isExtended__` property:\n\n```javascript\nSet.__isExtended__ // true if this package is installed\n```\n\n## API Documentation\n\nThere is a [markdown version](./API.md) and a [html version](https://jankapunkt.github.io/js-set-extension/) of the API documentation.\nIf you think this documentation can be improved, please leave a pull request or open an issue.\n\n## Run the tests\n\nAdd the description about testing in the README:\n\nYou can run the tests like the following:\n\n```bash\n$ cd js-set-extension/package\n$ npm install\n```\n\nTo run tests in watch mode use\n\n```bash\n$ npm run test-watch\n```\n\nor for a single run use\n\n```bash\n$ npm run test\n```\n\nThe tests are written in mocha but it should not be that hard to get into it as it is written very intuitive.\n\n### Linter\n\nPlease note, that the tests are very strict about code style and you can check for code style related errors using\n\n```bash\nnpm run lint\n```\n\nYou should fix these lint errors, since the CI server will reject to run any tests when the linter as thrown an error.\n\nYou can also run lint and tests all in one process using\n\n```bash\nnpm run lint-test\n```\n\nThe scripts to run these commands are also in the package.json file:\n\nhttps://github.com/jankapunkt/js-set-extension/blob/master/package/package.json\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjankapunkt%2Fjs-set-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjankapunkt%2Fjs-set-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjankapunkt%2Fjs-set-extension/lists"}