{"id":13659257,"url":"https://github.com/auth0/node-odata-parser","last_synced_at":"2025-10-02T10:32:07.208Z","repository":{"id":5211572,"uuid":"6387421","full_name":"auth0/node-odata-parser","owner":"auth0","description":"OData query string parser for node.js.","archived":true,"fork":false,"pushed_at":"2017-08-15T00:40:54.000Z","size":94,"stargazers_count":106,"open_issues_count":22,"forks_count":73,"subscribers_count":118,"default_branch":"master","last_synced_at":"2024-05-16T23:42:32.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"scodec/scodec-bits","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/auth0.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":"2012-10-25T13:09:29.000Z","updated_at":"2023-09-19T21:14:21.000Z","dependencies_parsed_at":"2022-09-20T23:22:15.014Z","dependency_job_id":null,"html_url":"https://github.com/auth0/node-odata-parser","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fnode-odata-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fnode-odata-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fnode-odata-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fnode-odata-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auth0","download_url":"https://codeload.github.com/auth0/node-odata-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234975093,"owners_count":18916156,"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-08-02T05:01:06.809Z","updated_at":"2025-10-02T10:32:01.893Z","avatar_url":"https://github.com/auth0.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"OData query string parser for node.js based on [pegjs](http://pegjs.majda.cz/).\r\n\r\n[![Build Status](https://travis-ci.org/auth0/node-odata-parser.svg)](https://travis-ci.org/auth0/node-odata-parser)\r\n\r\n## Installation\r\n\r\n```\r\nnpm install odata-parser\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nvar parser = require(\"odata-parser\");\r\n\r\nvar ast = parser.parse(\"$top=10\u0026$skip=5\u0026$select=foo\")\r\n\r\nutil.inspect(ast)\r\n```\r\n\r\nwill result in:\r\n\r\n```javascript\r\n{\r\n  '$top': 10,\r\n  '$skip': 5,\r\n  '$select': [ 'foo' ]\r\n}\r\n```\r\n\r\nFilters like:\r\n\r\n```javascript\r\nparser.parse(\"$filter=Name eq 'John' and LastName lt 'Doe'\")\r\n```\r\nresults in:\r\n\r\n```javascript\r\n\r\n{\r\n    $filter: {\r\n        type: 'and',\r\n        left: {\r\n            type: 'eq',\r\n            left: {\r\n                type: 'property',\r\n                name: 'Name'\r\n            },\r\n            right: {\r\n                type: 'literal',\r\n                value: 'John'\r\n            }\r\n        },\r\n        right: {\r\n            type: 'lt',\r\n            left: {\r\n                type: 'property',\r\n                name: 'LastName'\r\n            },\r\n            right: {\r\n                type: 'literal',\r\n                value: 'Doe'\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nUsing functions in filters\r\n\r\n```javascript\r\nparser.parse(\"$filter=substringof('nginx', Servers)\")\r\n```\r\n\r\nrestuls in:\r\n\r\n```javascript\r\n{\r\n    $filter: {\r\n        type: 'functioncall',\r\n        func: 'substringof',\r\n        args: [{\r\n            type: 'literal',\r\n            value: 'nginx'\r\n        }, {\r\n            type: 'property',\r\n            name: 'Servers'\r\n        }]\r\n    }\r\n}\r\n```\r\n\r\n## Issue Reporting\r\n\r\nIf you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.\r\n\r\n## Author\r\n\r\n[Auth0](auth0.com)\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fnode-odata-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0%2Fnode-odata-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fnode-odata-parser/lists"}