odata-parser

WebJar for odata-parser

License

License

MIT
Categories

Categories

Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

odata-parser
Last Version

Last Version

1.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

odata-parser
WebJar for odata-parser
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/auth0/node-odata-parser

Download odata-parser

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/odata-parser/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>odata-parser</artifactId>
    <version>1.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/odata-parser/
implementation 'org.webjars.npm:odata-parser:1.4.1'
// https://jarcasting.com/artifacts/org.webjars.npm/odata-parser/
implementation ("org.webjars.npm:odata-parser:1.4.1")
'org.webjars.npm:odata-parser:jar:1.4.1'
<dependency org="org.webjars.npm" name="odata-parser" rev="1.4.1">
  <artifact name="odata-parser" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='odata-parser', version='1.4.1')
)
libraryDependencies += "org.webjars.npm" % "odata-parser" % "1.4.1"
[org.webjars.npm/odata-parser "1.4.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

OData query string parser for node.js based on pegjs.

Build Status

Installation

npm install odata-parser

Usage

var parser = require("odata-parser");

var ast = parser.parse("$top=10&$skip=5&$select=foo")

util.inspect(ast)

will result in:

{
  '$top': 10,
  '$skip': 5,
  '$select': [ 'foo' ]
}

Filters like:

parser.parse("$filter=Name eq 'John' and LastName lt 'Doe'")

results in:

{
    $filter: {
        type: 'and',
        left: {
            type: 'eq',
            left: {
                type: 'property',
                name: 'Name'
            },
            right: {
                type: 'literal',
                value: 'John'
            }
        },
        right: {
            type: 'lt',
            left: {
                type: 'property',
                name: 'LastName'
            },
            right: {
                type: 'literal',
                value: 'Doe'
            }
        }
    }
}

Using functions in filters

parser.parse("$filter=substringof('nginx', Servers)")

restuls in:

{
    $filter: {
        type: 'functioncall',
        func: 'substringof',
        args: [{
            type: 'literal',
            value: 'nginx'
        }, {
            type: 'property',
            name: 'Servers'
        }]
    }
}

Issue Reporting

If 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 details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

org.webjars.npm

Auth0

Versions

Version
1.4.1