{"id":15649000,"url":"https://github.com/jaredly/get_in_ppx","last_synced_at":"2025-04-23T13:44:44.426Z","repository":{"id":57120332,"uuid":"155557058","full_name":"jaredly/get_in_ppx","owner":"jaredly","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-18T19:57:41.000Z","size":2104,"stargazers_count":40,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T18:55:44.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Reason","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/jaredly.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}},"created_at":"2018-10-31T12:53:08.000Z","updated_at":"2020-01-13T12:41:32.000Z","dependencies_parsed_at":"2022-08-23T19:40:40.281Z","dependency_job_id":null,"html_url":"https://github.com/jaredly/get_in_ppx","commit_stats":null,"previous_names":["jaredly/get_in"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fget_in_ppx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fget_in_ppx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fget_in_ppx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fget_in_ppx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredly","download_url":"https://codeload.github.com/jaredly/get_in_ppx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250441837,"owners_count":21431227,"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-10-03T12:27:20.635Z","updated_at":"2025-04-23T13:44:44.409Z","avatar_url":"https://github.com/jaredly.png","language":"Reason","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get_in ppx\n\nAn exploration of the [\"safe call operators\" pull-request](https://github.com/facebook/reason/pull/2142), implemented as a ppx.\n\n## Installation\n\n`npm i get_in_ppx`\n\nbsconfig.json\n\n```\n\"ppx-flags\": [\"get_in_ppx/ppx\"]\n```\n\n## Operators\nThis ppx includes two operators, that are valid within the `[%get_in ]` form.\n\n- `#??` is to be used when *both sides* are optional. E.g. the object on the left is optional, and the attribute you're getting out is also optional. e.g. `option({. \"attr\": option(int)})`\n- `#?` is to be used when *only the object* is optional, but the attribute you're getting out is not. e.g. `option({. \"attr\": int})`\n\n## Usage\n\n```\n/* some data with optional attributes in javascript objects (e.g. from graphql) */\nlet one = Some({\"two\": Some({\"three\": 4})});\n\nlet x: option(int) = [%get_in one#??two#?three];\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fget_in_ppx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredly%2Fget_in_ppx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fget_in_ppx/lists"}