{"id":37814119,"url":"https://github.com/udaysingh236/odata-query-parser","last_synced_at":"2026-01-16T15:36:58.480Z","repository":{"id":239908248,"uuid":"800918047","full_name":"udaysingh236/odata-query-parser","owner":"udaysingh236","description":"A highly versatile and fast OData Version 4.01 Parser which support almost all the available system query options like $filter, $orderby, $skip, $top, $count.","archived":false,"fork":false,"pushed_at":"2024-06-03T06:23:41.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-18T04:51:02.045Z","etag":null,"topics":["odata","odata-query-parser","odata-server","odatav4"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@slackbyte/odata-query-parser","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/udaysingh236.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-15T08:48:49.000Z","updated_at":"2024-08-05T05:22:28.000Z","dependencies_parsed_at":"2024-06-01T14:16:49.224Z","dependency_job_id":"f95145d5-3395-4556-aa60-da85b55666d4","html_url":"https://github.com/udaysingh236/odata-query-parser","commit_stats":null,"previous_names":["udaysingh236/odata-query-parser"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/udaysingh236/odata-query-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udaysingh236%2Fodata-query-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udaysingh236%2Fodata-query-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udaysingh236%2Fodata-query-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udaysingh236%2Fodata-query-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/udaysingh236","download_url":"https://codeload.github.com/udaysingh236/odata-query-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udaysingh236%2Fodata-query-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["odata","odata-query-parser","odata-server","odatav4"],"created_at":"2026-01-16T15:36:57.760Z","updated_at":"2026-01-16T15:36:58.469Z","avatar_url":"https://github.com/udaysingh236.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# odata-query-parser\n\nA highly versatile and fast OData Version 4.01 Parser which support almost all the available system query options like $filter, $orderby, $skip, $top, $count.\nThe [Open Data Protocol (OData)](https://www.odata.org/) enables the creation of REST-based data services which allow resources, identified using Uniform Resource Locators (URLs) and defined in a data model.\nThe Parser on high level works on lexer scanner strategy.\n\n## How to build\n\nTo run the parser in local, please clone the repository and follow the below steps:\n\n```JavaScript\nnpm install\nnpm run parser\n```\n\nTo test and for test coverage:\n\n```JavaScript\nnpm test\nnpm run test:report\n```\n\n## How to use\n\n```JavaScript\nimport { parseFilter, parseOrderby, parseSkip, parseTop } from '@slackbyte/odata-query-parser';\nconst filter = \"Price gt 20 or Rating ge 10 not (Name eq 'uday singh' and City in ('Redmond', 'London'))\"\nconsole.log(parseFilter(filter));\n```\n\nOutput:\n\n```JavaScript\n{\n  token: [\n    { tokenType: 'conditionMemberExp', subType: '', value: 'Price' },\n    { tokenType: 'comOperatorExp', subType: 'greaterThanExp', value: '\u003e'},\n    { tokenType: 'conditionMemberExp', subType: '', value: '20' },\n    { tokenType: 'logOperatorExp', subType: 'orExp', value: 'OR' },\n    { tokenType: 'conditionMemberExp', subType: '', value: 'Rating' },\n    { tokenType: 'comOperatorExp', subType: 'greaterThanEqualToExp', value: '\u003e='},\n    { tokenType: 'conditionMemberExp', subType: '', value: '10' },\n    { tokenType: 'logOperatorExp', subType: 'notExp', value: 'NOT' },\n    { tokenType: 'groupOperatorExp', subType: 'openBracExp', value: '('},\n    { tokenType: 'conditionMemberExp', subType: '', value: 'Name' },\n    { tokenType: 'comOperatorExp', subType: 'equalToExp', value: '=' },\n    { tokenType: 'conditionMemberExp', subType: '', value: \"'uday singh'\"},\n    { tokenType: 'logOperatorExp', subType: 'andExp', value: 'AND' },\n    { tokenType: 'conditionMemberExp', subType: '', value: 'City' },\n    { tokenType: 'comOperatorExp', subType: 'inExp', value: 'in' },\n    { tokenType: 'conditionMemberExp', subType: '', value: \"('Redmond', 'London')\"},\n    { tokenType: 'groupOperatorExp', subType: 'closeBracExp', value: ')'}\n  ]\n}\n```\n\n## Support Features\n\n-   [x] $count\n-   [x] $filter\n    -   [x] Comparison Operators\n        -   [x] eq\n        -   [x] ne\n        -   [x] lt\n        -   [x] le\n        -   [x] gt\n        -   [x] ge\n        -   [x] has\n        -   [x] in\n    -   [x] Logical Operators\n        -   [x] and\n        -   [x] or\n        -   [x] not\n    -   [x] Arithmetic Operators\n        -   [x] add\n        -   [x] sub\n        -   [x] mul\n        -   [x] div\n        -   [ ] divby\n        -   [x] mod\n    -   [x] String Functions\n        -   [x] indexof\n        -   [x] contains\n        -   [x] endswith\n        -   [x] startswith\n        -   [x] length\n        -   [x] substring\n        -   [x] tolower\n        -   [x] toupper\n        -   [x] trim\n        -   [x] concat\n    -   [x] Date Functions\n        -   [x] year\n        -   [x] month\n        -   [x] day\n        -   [x] hour\n        -   [x] minute\n        -   [x] second\n        -   [x] fractionalseconds\n        -   [x] date\n        -   [x] time\n        -   [x] totaloffsetminutes\n        -   [x] now\n        -   [x] mindatetime\n        -   [x] maxdatetime\n    -   [x] Math Functions\n        -   [x] round\n        -   [x] floor\n        -   [x] ceiling\n    -   [x] Type and conditional Functions\n        -   [x] cast\n        -   [x] isof\n        -   [x] case\n-   [ ] $select\n-   [x] $top\n-   [x] $skip\n-   [x] $orderby\n\n## CONTRIBUTING\n\nI love your inputs! and I want to make your contribution to this project easy and transparent, whether it's:\n\n-   Reporting a bug\n-   Discussing the current state of the code\n-   Submitting a fix\n-   Proposing new features\n\nPlease raise a pull request. 😊\n\nMade with love in INDIA. ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudaysingh236%2Fodata-query-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudaysingh236%2Fodata-query-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudaysingh236%2Fodata-query-parser/lists"}