OData Query Generator
The OData module is designed to generate OData query strings for specific API endpoints. General usage is as follows.
var qb = new OData.QueryBuilder('/api/users'); qb.addWhereFilter('id1', OData.STRING, 'fName', OData.EQUALS, 'Bartholomew'); var query = qb.generateQueryUrl(); // query would equal "/api/users/?$filter=fName eq 'Bartholomew'"