{"id":24379714,"url":"https://github.com/y-js/y-selections","last_synced_at":"2026-04-29T04:02:18.859Z","repository":{"id":29972188,"uuid":"33519155","full_name":"y-js/y-selections","owner":"y-js","description":"Selections type for Yjs","archived":false,"fork":false,"pushed_at":"2015-05-29T09:21:01.000Z","size":3457,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-22T09:05:52.258Z","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/y-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-07T03:11:07.000Z","updated_at":"2015-05-07T10:57:28.000Z","dependencies_parsed_at":"2022-09-22T08:10:27.150Z","dependency_job_id":null,"html_url":"https://github.com/y-js/y-selections","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/y-js/y-selections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-selections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-selections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-selections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-selections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y-js","download_url":"https://codeload.github.com/y-js/y-selections/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-selections/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28095583,"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-12-28T02:00:05.685Z","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":"2025-01-19T07:18:53.312Z","updated_at":"2025-12-28T07:02:15.980Z","avatar_url":"https://github.com/y-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Selections Type for [Yjs](https://github.com/y-js/yjs)\n\nManage selections on y-list objects with this shareable type.\n\n## Use it!\nRetrieve this with bower or npm.\n\n##### Bower\n```\nbower install y-selections --save\n```\n\nand include the js library.\n\n```\n\u003cscript src=\"./bower_components/y-selections/y-selections.js\"\u003e\u003c/script\u003e\n```\n\n##### NPM\n```\nnpm install y-selections --save\n```\nand put it on the `Y` object.\n\n```\nY.Selections = require(\"y-selections\");\n```\n\n### Selections Object\n\n##### Reference\n* Create\n```\nvar ysel = new Y.Selections()\n```\n* .select(from, to, attrs)\n  * Assign a set of attributes to a range. This method expects *references* (see y-list documentation) as the first two parameters (from, and to), and *attrs* should be an _Object_. Make sure that *from* is a predecessor of *to*!\n* .unselect(from, to, attrs)\n  * Remove a set of attributes from a range. This method expects *references* (see y-list documentation) as the first two parametrs (from, and to), and *attrs* should be an _Array_. Make sure that *from* is a predecessor of *to*!\n* .unselectAll(from, to)\n  * Remove all attributes from a range. This method expects *references* (see y-list documentation) as the first two parametrs (from, and to). Make sure that *from* is a predecessor of *to*!\n* .observe(f)\n  * The observer is called whenever something on this text object changed. (throws select, and unselect events)\n* .unobserve(f)\n  * Delete an observer\n\n## License\nYjs and y-selections are licensed under the [MIT License](./LICENSE.txt).\n\n\u003ckevin.jahns@rwth-aachen.de\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-js%2Fy-selections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy-js%2Fy-selections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-js%2Fy-selections/lists"}