Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

odata-query-builder

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odata-query-builder - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.npmignore

11

package.json
{
"name": "odata-query-builder",
"version": "0.0.3",
"version": "0.0.4",
"description": "An eloquently fluent OData query builder.",

@@ -25,2 +25,5 @@ "main": "dist/index.js",

"fluent api",
"angular 8",
"angular 7",
"angular 6",
"angular 5",

@@ -39,3 +42,5 @@ "angular 2",

"@types/jest": "^23.3.1",
"@types/lodash": "^4.14.116",
"@types/lodash": "^4.14.149",
"@types/lodash.orderby": "^4.6.6",
"@types/node": "^13.1.6",
"awesome-typescript-loader": "^5.2.0",

@@ -45,3 +50,3 @@ "dts-bundle": "^0.7.3",

"jest": "^23.4.2",
"lodash": "^4.17.10",
"lodash.orderby": "^4.6.0",
"source-map-loader": "^0.2.3",

@@ -48,0 +53,0 @@ "ts-jest": "^23.0.1",

@@ -25,2 +25,3 @@ # odata-query-builder

.filter(f => f.filterExpression('Property', 'eq', 'MyValue'))
.select('My Properties')
.toQuery()

@@ -27,0 +28,0 @@ ```

@@ -8,2 +8,3 @@ export enum FragmentType {

Filter = 6,
Select = 7
}

@@ -27,2 +27,7 @@ import { QueryBuilder } from './queryBuilder';

});
it('should return select', () => {
expect(new QueryBuilder().select('test').toQuery()).toEqual(
'?$select=test'
)
});
it('should add a new filter expression', () => {

@@ -29,0 +34,0 @@ const testCases = new TestCaseCollection([

@@ -1,6 +0,6 @@

import { orderBy } from 'lodash';
import { FragmentType } from './enums';
import { QueryFragment } from './queryFragment';
const orderBy = require('lodash.orderby');
type filterExpressionType = string | number | boolean | Date;

@@ -74,2 +74,6 @@

};
select = (fields: string) => {
this.fragments.push(new QueryFragment(FragmentType.Select, `$select=${fields}`));
return this;
};

@@ -76,0 +80,0 @@ filter = (predicate: (filter: FilterBuilder) => FilterBuilder, operator: string = 'and') => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc