{"id":21441307,"url":"https://github.com/noorzaie/aqs","last_synced_at":"2026-05-20T02:44:52.863Z","repository":{"id":45617651,"uuid":"434881013","full_name":"noorzaie/aqs","owner":"noorzaie","description":"A query string parser with advanced features","archived":false,"fork":false,"pushed_at":"2021-12-04T15:38:32.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T22:48:15.658Z","etag":null,"topics":["nodejs","parse","parser","query","querystring","url"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/noorzaie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-04T11:20:08.000Z","updated_at":"2022-12-22T16:43:49.000Z","dependencies_parsed_at":"2022-09-10T21:02:16.412Z","dependency_job_id":null,"html_url":"https://github.com/noorzaie/aqs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noorzaie%2Faqs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noorzaie%2Faqs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noorzaie%2Faqs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noorzaie%2Faqs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noorzaie","download_url":"https://codeload.github.com/noorzaie/aqs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955750,"owners_count":20374372,"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":["nodejs","parse","parser","query","querystring","url"],"created_at":"2024-11-23T01:23:24.843Z","updated_at":"2026-05-20T02:44:52.824Z","avatar_url":"https://github.com/noorzaie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"AQS is a query parser library that provides advanced operations comparing to typical query parser libraries.\nFor example, you can use different operators additional to `=`, or parse values from string to whatever you want and even define complex logic instead of just using `and` operator for parameters!\n\n## Installation\n\n```npm\nnpm install aqs\n```\n\n## Usage\n\n### Basic\n```javascript\nconst { parse } = require('aqs');\n\nconst parsed = parse('id=3\u0026age=22');\n```\n\n### Use other operators\n```javascript\nconst { parse } = require('aqs');\n\nconst parsed = parse('id=3\u0026age{gt}22'); // Greater than\n```\n\n### Use negative operators\nYou can add `n` prefix to operator names or `not_` to full name of operators to make them negative.\n```javascript\nconst { parse } = require('aqs');\n\nconst parsed = parse('id=3\u0026age{ne}22'); // Not equal\n``` \n\n### Use with config\n```javascript\nconst { parse } = require('aqs');\n\nconst parsed = parse('id=3\u0026age=22', { paramsConfigs: { age: { defaultValue: 20 } } });\n```\n\n### Use with custom logic\nYou can define logic of parameters in `logic` query string, using parentheses with `and` and `or` operators.\n\nBenefit of this feature is that you can allow client side that makes more complex queries instead of simple `equal` queries.\n```javascript\nconst { parse } = require('aqs');\n\nconst parsed = parse('skill=coding\u0026age=30\u0026experience=8\u0026logic=(and,skill,(or,age,experience))');   // skill==coding and (age==30 or experience==8)\n```\n### Other features\nThere are some other features such as defining custom operators, parse values, ... that you can find them in [examples](https://github.com/noorzaie/aqs/tree/master/examples) folder.\n\n## List of operators\n\n| Operator        | Full-name           |\n| ------------- | -------------:|\n| e      | equal |\n| i      | in      |\n| sw | startsWith      |\n| ew | endsWith      |\n| gt | greaterThan      |\n| lt | lessThan      |\n| ge | greaterOrEqual      |\n| le | lessOrEqual      |\n| b | between      |\n| c | contains      |\n| ic | includes      |\n| l | like      |\n| il | ilike      |\n| r | regex      |\n\n## Configurations\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003cth\u003eOption\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eDefault value\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\u003ctd rowspan=\"7\"\u003e\u003cb\u003eparamsConfigs\u003c/b\u003e\u003cbr\u003e(Configs that can be set for each parameter)\u003c/td\u003e\n\u003ctd\u003edefaultValue\u003c/td\u003e\u003ctd\u003eDefault value of specific param\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003edefaultOptions\u003c/td\u003e\u003ctd\u003eSet default operator for specific param\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eparser\u003c/td\u003e\u003ctd\u003eUse a parser to parse value\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eallowUnParseAble\u003c/td\u003e\u003ctd\u003eIf true, throws error if value is not parsable with the parser, Otherwise unparsed value will be used\u003c/td\u003e\u003ctd\u003efalse\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ealias\u003c/td\u003e\u003ctd\u003eUse another key instead of passed key\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eallowedOps\u003c/td\u003e\u003ctd\u003eList of allowed operators to be used\u003c/td\u003e\u003ctd\u003eall\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003emapOp\u003c/td\u003e\u003ctd\u003eIf false, short name of operator will be returned, Otherwise fullname of operator will be returned\u003c/td\u003e\u003ctd\u003etrue\u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\u003ctd rowspan=\"7\"\u003e\u003cb\u003eglobalConfigs\u003c/b\u003e\u003cbr\u003e(Configs that will be applied on all parameters)\u003c/td\u003e\n\u003ctd\u003eallowedParams\u003c/td\u003e\u003ctd\u003eList of parameters that could be passed in query string\u003c/td\u003e\u003ctd\u003eall\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eexcludedParams\u003c/td\u003e\u003ctd\u003eList of parameters that could not be passed in query string\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eparseArrays\u003c/td\u003e\u003ctd\u003eParse array values or not\u003c/td\u003e\u003ctd\u003etrue\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eparseJsons\u003c/td\u003e\u003ctd\u003eParse json values or not\u003c/td\u003e\u003ctd\u003etrue\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ethrowOnIllegalOp\u003c/td\u003e\u003ctd\u003eIf true, throws error if an unknown operator passed\u003c/td\u003e\u003ctd\u003efalse\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eallowLogic\u003c/td\u003e\u003ctd\u003eAllow logic in query string or not\u003c/td\u003e\u003ctd\u003etrue\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ethrowWrongLogic\u003c/td\u003e\u003ctd\u003eThrow error if incorrect logic passed\u003c/td\u003e\u003ctd\u003efalse\u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\u003ctd rowspan=\"7\"\u003e\u003cb\u003efixedParams\u003c/b\u003e\u003cbr\u003e(List of parameters that always will be returned)\u003c/td\u003e\n\u003ctd\u003ename\u003c/td\u003e\u003ctd\u003eName of parameter\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003evalue\u003c/td\u003e\u003ctd\u003eValue of parameter\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eop\u003c/td\u003e\u003ctd\u003eOperator of parameter\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003enot\u003c/td\u003e\u003ctd\u003eNegate operator or not\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoorzaie%2Faqs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoorzaie%2Faqs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoorzaie%2Faqs/lists"}