@thisisagile/easy 11.8.9 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/data/Condition.d.ts
CHANGED
|
@@ -22,3 +22,4 @@ export declare class SortCondition extends Condition implements Sort {
|
|
|
22
22
|
toJSON(): Json;
|
|
23
23
|
}
|
|
24
24
|
export declare const toCondition: (field: string, operator: string, value: unknown, conv?: Convert) => Condition;
|
|
25
|
+
export declare const isSortCondition: (s?: unknown) => s is SortCondition;
|
package/dist/data/Condition.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toCondition = exports.SortCondition = exports.LogicalCondition = exports.Condition = void 0;
|
|
3
|
+
exports.isSortCondition = exports.toCondition = exports.SortCondition = exports.LogicalCondition = exports.Condition = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
class Condition {
|
|
@@ -39,4 +39,6 @@ class SortCondition extends Condition {
|
|
|
39
39
|
exports.SortCondition = SortCondition;
|
|
40
40
|
const toCondition = (field, operator, value, conv = utils_1.convert.default) => new Condition(field, operator, conv.from(value));
|
|
41
41
|
exports.toCondition = toCondition;
|
|
42
|
+
const isSortCondition = (s) => (0, types_1.isDefined)(s) && s instanceof SortCondition;
|
|
43
|
+
exports.isSortCondition = isSortCondition;
|
|
42
44
|
//# sourceMappingURL=Condition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Condition.js","sourceRoot":"","sources":["../../src/data/Condition.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Condition.js","sourceRoot":"","sources":["../../src/data/Condition.ts"],"names":[],"mappings":";;;AAAA,oCAAkE;AAClE,oCAA4C;AAE5C,MAAa,SAAS;IACpB,YAAqB,GAAW,EAAW,QAAgB,EAAW,KAAc;QAA/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ACpC,CAAC;CACF;AARD,sCAQC;AAEM,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAE,KAAc,EAAE,OAAgB,eAAO,CAAC,OAAO,EAAa,EAAE,CACzH,IAAI,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAc,CAAC,CAAC;AADnD,QAAA,WAAW,eACwC;AAEzD,MAAM,eAAe,GAAG,CAAC,CAAW,EAAsB,EAAE,CAAC,IAAA,iBAAS,EAAC,CAAC,CAAC,IAAI,CAAC,YAAY,aAAa,CAAC;AAAlG,QAAA,eAAe,mBAAmF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@thisisagile/easy-test": "
|
|
34
|
+
"@thisisagile/easy-test": "12.0.0",
|
|
35
35
|
"@types/form-urlencoded": "^4.4.0",
|
|
36
36
|
"@types/jsonwebtoken": "^8.5.8",
|
|
37
37
|
"@types/luxon": "3.0.0",
|
package/src/data/Condition.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { json, Json, JsonValue, Sort } from '../types';
|
|
1
|
+
import { isDefined, json, Json, JsonValue, Sort } from '../types';
|
|
2
2
|
import { convert, Convert } from '../utils';
|
|
3
3
|
|
|
4
4
|
export class Condition {
|
|
@@ -32,3 +32,5 @@ export class SortCondition extends Condition implements Sort {
|
|
|
32
32
|
|
|
33
33
|
export const toCondition = (field: string, operator: string, value: unknown, conv: Convert = convert.default): Condition =>
|
|
34
34
|
new Condition(field, operator, conv.from(value) as JsonValue);
|
|
35
|
+
|
|
36
|
+
export const isSortCondition = (s?: unknown): s is SortCondition => isDefined(s) && s instanceof SortCondition;
|