{"id":13847300,"url":"https://github.com/sungwoncho/qparse","last_synced_at":"2025-10-11T04:09:33.532Z","repository":{"id":46342171,"uuid":"239893016","full_name":"sungwoncho/qparse","owner":"sungwoncho","description":"A simple top-down parser for advanced search queries","archived":false,"fork":false,"pushed_at":"2023-03-03T23:22:58.000Z","size":113,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T23:12:49.451Z","etag":null,"topics":["advanced-search","parser","query-parser","search","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sungwoncho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-02-12T00:23:14.000Z","updated_at":"2025-01-03T01:54:50.000Z","dependencies_parsed_at":"2024-08-04T18:12:30.132Z","dependency_job_id":null,"html_url":"https://github.com/sungwoncho/qparse","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/sungwoncho%2Fqparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sungwoncho%2Fqparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sungwoncho%2Fqparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sungwoncho%2Fqparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sungwoncho","download_url":"https://codeload.github.com/sungwoncho/qparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337946,"owners_count":21414104,"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":["advanced-search","parser","query-parser","search","typescript"],"created_at":"2024-08-04T18:01:16.038Z","updated_at":"2025-10-11T04:09:28.512Z","avatar_url":"https://github.com/sungwoncho.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# qparse\n\n[![Build Status](https://travis-ci.org/sungwoncho/qparse.svg?branch=master)](https://travis-ci.org/sungwoncho/qparse)\n\nA top-down parser to turn advanced search query strings into JavaScript objects.\n\nIt has *no dependency* and provides *a simple interface* with *readable implementation*.\n\n## Installation\n\n```bash\n# Using npm\nnpm install --save qparse\n\n# Using yarn\nyarn add qparse\n```\n\n## Usage\n\n### parse(str, keywords)\n\nParse the given `str` while matching the `keywords`.\n\n```js\nconst q = require('qparse');\n\nq.parse('tag:foo tag:bar sort:baz quz qux', ['tag', 'sort']);\n// =\u003e { text: 'quz qux', filters: { tag: [ 'foo', 'bar' ], sort: 'baz' } }\n\nq.parse('tag:foo tag:bar sort:baz quz qux', ['tag']);\n// =\u003e { text: 'sort:baz quz qux', filters: { tag: [ 'foo', 'bar' ] } }\n\nq.parse('tag:foo sort:baz quz qux', ['tag']);\n// =\u003e { text: 'sort:baz quz qux', filters: { tag: 'foo' } }\n\nq.parse('tag:foo sort:baz quz qux', []);\n// =\u003e { text: 'tag:foo sort:baz quz qux', filters: {} }\n```\n\n## Real World Example\n\nUsed by [Dnote](https://github.com/dnote/dnote).\n\n## LICENSE\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsungwoncho%2Fqparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsungwoncho%2Fqparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsungwoncho%2Fqparse/lists"}