{"id":21883796,"url":"https://github.com/vovanr/toggle-in-set","last_synced_at":"2026-05-08T00:33:35.668Z","repository":{"id":44163138,"uuid":"271267038","full_name":"VovanR/toggle-in-set","owner":"VovanR","description":"Add or remove item from Set","archived":false,"fork":false,"pushed_at":"2023-07-13T11:13:38.000Z","size":748,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T14:58:35.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/VovanR.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-10T12:10:06.000Z","updated_at":"2022-11-17T11:22:56.000Z","dependencies_parsed_at":"2025-01-26T19:31:59.505Z","dependency_job_id":"33ea5984-880b-4cd1-bd81-438d480214b0","html_url":"https://github.com/VovanR/toggle-in-set","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Ftoggle-in-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Ftoggle-in-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Ftoggle-in-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Ftoggle-in-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VovanR","download_url":"https://codeload.github.com/VovanR/toggle-in-set/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244891205,"owners_count":20527212,"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-11-28T09:46:52.202Z","updated_at":"2026-05-08T00:33:35.610Z","avatar_url":"https://github.com/VovanR.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toggle-in-set\n\n[![Commitizen friendly][commitizen-image]][commitizen-url]\n[![XO code style][codestyle-image]][codestyle-url]\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Coveralls Status][coveralls-image]][coveralls-url]\n\n\u003e Add or remove item from Set\n\n## Install\n\n```shell\nnpm install --save toggle-in-set\n```\n\n## Usage\n\n```js\nvar toggleInSet = require('toggle-in-set');\n\ntoggleInSet(new Set([1, 2, 3]), 2);\n//=\u003e Set(2) {1, 3}\n\ntoggleInSet(new Set([1, 2, 3]), 4);\n//=\u003e Set(4) {1, 2, 3, 4}\n```\n\n## API\n\n### `toggleInSet(set, value)`\n\nReturns an `Set` with `value` if `set` is not includes this `value`\u003cbr\u003e\nReturns an `Set` without `value` if `set` is includes this `value`\n\n#### set\n*Required*\u003cbr\u003e\nType: `Set`\n\nSet with values needs to toggle\n\n#### value\n*Required*\u003cbr\u003e\nType: `*`\n\nValue to toggle in `set`\n\n\n## License\nMIT © [Vladimir Rodkin](https://github.com/VovanR)\n\n[commitizen-url]: https://commitizen.github.io/cz-cli/\n[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\n\n[codestyle-url]: https://github.com/xojs/xo\n[codestyle-image]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square\n\n[npm-url]: https://npmjs.org/package/toggle-in-set\n[npm-image]: https://img.shields.io/npm/v/toggle-in-set.svg?style=flat-square\n\n[build-url]: https://github.com/VovanR/toggle-in-set/actions/workflows/test-workflow.yml\n[build-image]: https://img.shields.io/github/actions/workflow/status/vovanr/toggle-in-set/test-workflow.yml?branch=master\u0026style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/VovanR/toggle-in-set\n[coveralls-image]: https://img.shields.io/coveralls/VovanR/toggle-in-set.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvovanr%2Ftoggle-in-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvovanr%2Ftoggle-in-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvovanr%2Ftoggle-in-set/lists"}