{"id":23178421,"url":"https://github.com/bn-l/proposalset","last_synced_at":"2026-01-24T04:33:37.463Z","repository":{"id":228369560,"uuid":"773805105","full_name":"bn-l/ProposalSet","owner":"bn-l","description":"An expanded javascript and typescript set that has all current set proposals with type information and intellisense explanations.","archived":false,"fork":false,"pushed_at":"2024-10-10T00:21:18.000Z","size":253,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-18T07:12:28.460Z","etag":null,"topics":[],"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/bn-l.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":"2024-03-18T12:37:02.000Z","updated_at":"2024-10-10T00:20:21.000Z","dependencies_parsed_at":"2024-06-01T16:13:39.941Z","dependency_job_id":null,"html_url":"https://github.com/bn-l/ProposalSet","commit_stats":null,"previous_names":["bn-l/proposalset"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2FProposalSet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2FProposalSet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2FProposalSet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2FProposalSet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bn-l","download_url":"https://codeload.github.com/bn-l/ProposalSet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238093836,"owners_count":19415320,"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":[],"created_at":"2024-12-18T07:11:06.405Z","updated_at":"2025-10-25T06:31:02.135Z","avatar_url":"https://github.com/bn-l.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# ProposalSet\r\n\r\n![header image of various venn diagrams](images/header.png)\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install proposal-set\r\n```\r\n\r\n## Description\r\n\r\nAn expanded javascript and typescript set that has all current set proposals with type information and\r\nintellisense explanations. Works in node and in the browser. Stop reinventing the wheel\r\nand start using extremely elegant, concise, and performant set operations. As a shim it will test if there's\r\na native implementation and use that first—so this package won't become an issue in the future. \r\n\r\nThe underlying shim ([es-shims](https://github.com/es-shims)) is robust and well tested but doesn't\r\nhave everything grouped together in one place. \r\n\r\n\r\n## Use\r\n\r\n```typescript\r\nimport pSet from \"proposal-set\";\r\n\r\nconst x = new pSet([1, 2, 3]);\r\nconst y = new pSet([1, 2]);\r\n\r\nconsole.log(x.difference(y));\r\n// =\u003e Set(1) { 3 }\r\n\r\nconsole.log(x.intersection(y));\r\n// =\u003e Set(2) { 1, 2 }\r\n\r\nconsole.log(x.union(y));\r\n// =\u003e Set(3) { 1, 2, 3 }\r\n```\r\n\r\n## Further Information\r\n\r\nThis packages implements the following proposed Set methods using shims provided by\r\n[es-shims](https://github.com/es-shims), including:\r\n\r\n\r\n\r\n### Set.difference \r\n\r\n[MDN Web Docs: Set.difference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/difference)\r\n\r\nEverything in A that's not in B:\r\n\r\n![set-difference](images/Set.difference.png)\r\n\r\n### Set.intersection\r\n\r\n[MDN Web Docs: Set.intersection](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/intersection)\r\n\r\nItems that are common between A and B.\r\n\r\n![alt text](images/Set.intersection.png)\r\n\r\n### Set.union\r\n\r\n[MDN Web Docs: Set.union](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/union)\r\n\r\nCombination of A and B\r\n\r\n![Set.union](images/Set.union.png)\r\n\r\n\r\n### Set.isSubsetOf\r\n\r\n[MDN Web Docs: Set.isSubsetOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/isSubsetOf)\r\n\r\nIs everything in A also in B?\r\n\r\n![Set.isSubsetOf](images/Set.isSubsetOf.png)\r\n\r\n### Set.isSupersetOf\r\n\r\n[MDN Web Docs: Set.isSupersetOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/isSupersetOf)\r\n\r\nDoes A contain everything in B?\r\n\r\n![Set.isSupersetOf](images/Set.isSupersetOf.png)\r\n\r\n### Set.isDisjointFrom\r\n\r\n[MDN Web Docs: Set.isDisjointFrom](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/isDisjointFrom)\r\n\r\nAre there no common elements between the two sets?\r\n\r\n![alt text](images/Set.isDisjointFrom.png)\r\n\r\n### Set.symmetricDifference\r\n\r\n[MDN Web Docs: Set.symmetricDifference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/symmetricDifference)\r\n\r\nThe opposite of an intersection. A new set containing everything unique to A and B in one set.\r\n\r\n![alt text](images/Set.symmetricDifference.png)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbn-l%2Fproposalset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbn-l%2Fproposalset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbn-l%2Fproposalset/lists"}