{"id":16859070,"url":"https://github.com/mkrhere/shotgun","last_synced_at":"2025-03-18T14:08:49.220Z","repository":{"id":134237264,"uuid":"147501169","full_name":"MKRhere/shotgun","owner":"MKRhere","description":"An opinionated micro DSL for object query and function call","archived":false,"fork":false,"pushed_at":"2018-09-05T10:53:51.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T18:47:57.959Z","etag":null,"topics":["dsl","object","query"],"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/MKRhere.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":"2018-09-05T10:31:27.000Z","updated_at":"2019-04-01T19:54:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b163640-7b7b-4108-b3eb-5d0f9f4c5703","html_url":"https://github.com/MKRhere/shotgun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKRhere%2Fshotgun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKRhere%2Fshotgun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKRhere%2Fshotgun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKRhere%2Fshotgun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MKRhere","download_url":"https://codeload.github.com/MKRhere/shotgun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244236080,"owners_count":20420759,"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":["dsl","object","query"],"created_at":"2024-10-13T14:16:06.318Z","updated_at":"2025-03-18T14:08:49.200Z","avatar_url":"https://github.com/MKRhere.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shotgun\n\nShotgun is a DSL to query an object and call a function.\n\n## Installation\n\n```shell\nnpm install shotgun-query\n```\n\n## Usage:\n\n```JavaScript\nconst expect = thing =\u003e\n\t({ equals: otherThing =\u003e thing === otherThing });\n\nnew Shotgun(\" res.status equals 200 \")\n\t.eval({ res: { status: 200 } })\n\t.call(expect);\n```\n\n## Convention\n\nThe function passed to `.call` must be of this signature:\n\n```TypeScript\nf = (arg : any) : object =\u003e ({\n\tg : (...rest : any[]) : any =\u003e { ... },\n\t...\n});\n```\n\nIt will be called as such:\n\n```JavaScript\nf(a)[g](...rest)\n```\n\nAnd the evaluation is returned.\n\n## Tests\n\n```shell\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrhere%2Fshotgun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkrhere%2Fshotgun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrhere%2Fshotgun/lists"}