{"id":20906167,"url":"https://github.com/distributedlife/ok-selector-immutable","last_synced_at":"2026-04-14T01:31:40.142Z","repository":{"id":141572224,"uuid":"96109999","full_name":"distributedlife/ok-selector-immutable","owner":"distributedlife","description":"ok-selector that works with ImmutableJS","archived":false,"fork":false,"pushed_at":"2017-07-04T07:06:41.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-31T17:46:46.714Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/distributedlife.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-07-03T12:46:08.000Z","updated_at":"2017-07-04T07:05:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"79cd1c4e-8500-4932-9f92-9d0b6462c710","html_url":"https://github.com/distributedlife/ok-selector-immutable","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/distributedlife/ok-selector-immutable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributedlife%2Fok-selector-immutable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributedlife%2Fok-selector-immutable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributedlife%2Fok-selector-immutable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributedlife%2Fok-selector-immutable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/distributedlife","download_url":"https://codeload.github.com/distributedlife/ok-selector-immutable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributedlife%2Fok-selector-immutable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31778580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T00:11:49.126Z","status":"ssl_error","status_checked_at":"2026-04-14T00:10:29.837Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-18T13:29:19.338Z","updated_at":"2026-04-14T01:31:40.111Z","avatar_url":"https://github.com/distributedlife.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ok-selector\nA small library for plucking values out of Immutable objects.\n\n`ok-selector` supports [immutablejs](https://github.com/facebook/immutable-js).\n\nGiven the following state:\n\n```javascript\nconst state = Immutable.fromJS({\n  level1: {\n    level2: {\n      level3: {\n        value: 'yes'\n      }\n    }\n  },\n  array: [\n    {id: 1, value: 2},\n    {id: 2, value: 4},\n    {id: 3, value: 6},\n    {id: 4, value: 8},\n  ]\n});\n```\n\nThese tests hold true\n\n```javascript\nit('should support dot.strings', () =\u003e {\n  expect(read(state, 'level1.level2.level3.value')).to.equal('yes');\n  expect(read(state, 'level1.level2.level3').toJS()).to.deep.equal({value: 'yes'});\n  expect(read(state, 'array').toJS()).to.deep.equal([\n    {id: 1, value: 2},\n    {id: 2, value: 4},\n    {id: 3, value: 6},\n    {id: 4, value: 8},\n  ]);\n});\n\nit('should support addressing arrays by id', () =\u003e {\n  expect(read(state, 'array:3').toJS()).to.deep.equal({id: 3, value: 6});\n  expect(read(state, 'array:3.value')).to.deep.equal(6);\n});\n\nit('should support plucking all values from an array', () =\u003e {\n  expect(read(state, 'array*.value').toJS()).to.deep.equal([2, 4, 6, 8]);\n});\n```\n\n# has\n`has` is like `read` but returns a boolean response.\n\n# Unwrapping\n\n`read` always returns an object of based on the underlying implementation. Sometimes this is not what you want. `unwrap` will convert the response of read to a native object. For immutable objects it'll call `toJS`. Depending on the size and complexity of your state tree this can be relatively expensive.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributedlife%2Fok-selector-immutable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistributedlife%2Fok-selector-immutable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributedlife%2Fok-selector-immutable/lists"}