@balena/sbvr-types
Advanced tools
Comparing version 3.2.0 to 3.3.0-date-datetime-before-after-9d4414558d16821e485e08fc4a0504ef1d6c617f
@@ -7,2 +7,7 @@ # Change Log | ||
# v3.3.0 | ||
## (2021-02-05) | ||
* Add `is before` & `is after` verbs to the Date & DateTime types [Thodoris Greasidis] | ||
# v3.2.0 | ||
@@ -9,0 +14,0 @@ ## (2021-01-29) |
@@ -10,2 +10,10 @@ export declare const types: { | ||
export declare const fetchProcessing: (data: any) => any; | ||
export declare const nativeFactTypes: { | ||
'Date Time': { | ||
'is before': (from: string, to: string) => string[]; | ||
'is after': (from: string, to: string) => string[]; | ||
'is equal to': (from: string, to: string) => string[]; | ||
equals: (from: string, to: string) => string[]; | ||
}; | ||
}; | ||
export declare const validate: { | ||
@@ -12,0 +20,0 @@ (value: any, required: true): Promise<Date>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validate = exports.fetchProcessing = exports.types = void 0; | ||
exports.validate = exports.nativeFactTypes = exports.fetchProcessing = exports.types = void 0; | ||
const TypeUtils = require("../type-utils"); | ||
@@ -20,3 +20,10 @@ exports.types = { | ||
exports.fetchProcessing = fetchProcessing; | ||
exports.nativeFactTypes = { | ||
'Date Time': { | ||
...TypeUtils.nativeFactTypeTemplates.equality, | ||
'is before': (from, to) => ['LessThan', from, to], | ||
'is after': (from, to) => ['GreaterThan', from, to], | ||
}, | ||
}; | ||
exports.validate = TypeUtils.validate.date; | ||
//# sourceMappingURL=date-time.js.map |
@@ -10,2 +10,10 @@ export declare const types: { | ||
export declare const fetchProcessing: (data: any) => any; | ||
export declare const nativeFactTypes: { | ||
Date: { | ||
'is before': (from: string, to: string) => string[]; | ||
'is after': (from: string, to: string) => string[]; | ||
'is equal to': (from: string, to: string) => string[]; | ||
equals: (from: string, to: string) => string[]; | ||
}; | ||
}; | ||
export declare const validate: { | ||
@@ -12,0 +20,0 @@ (value: any, required: true): Promise<Date>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validate = exports.fetchProcessing = exports.types = void 0; | ||
exports.validate = exports.nativeFactTypes = exports.fetchProcessing = exports.types = void 0; | ||
const TypeUtils = require("../type-utils"); | ||
@@ -20,3 +20,10 @@ exports.types = { | ||
exports.fetchProcessing = fetchProcessing; | ||
exports.nativeFactTypes = { | ||
Date: { | ||
...TypeUtils.nativeFactTypeTemplates.equality, | ||
'is before': (from, to) => ['LessThan', from, to], | ||
'is after': (from, to) => ['GreaterThan', from, to], | ||
}, | ||
}; | ||
exports.validate = TypeUtils.validate.date; | ||
//# sourceMappingURL=date.js.map |
{ | ||
"name": "@balena/sbvr-types", | ||
"version": "3.2.0", | ||
"version": "3.3.0-date-datetime-before-after-9d4414558d16821e485e08fc4a0504ef1d6c617f", | ||
"description": "SBVR type definitions.", | ||
@@ -5,0 +5,0 @@ "main": "out", |
@@ -19,2 +19,10 @@ import * as TypeUtils from '../type-utils'; | ||
export const nativeFactTypes = { | ||
'Date Time': { | ||
...TypeUtils.nativeFactTypeTemplates.equality, | ||
'is before': (from: string, to: string) => ['LessThan', from, to], | ||
'is after': (from: string, to: string) => ['GreaterThan', from, to], | ||
}, | ||
}; | ||
export const validate = TypeUtils.validate.date; |
@@ -19,2 +19,10 @@ import * as TypeUtils from '../type-utils'; | ||
export const nativeFactTypes = { | ||
Date: { | ||
...TypeUtils.nativeFactTypeTemplates.equality, | ||
'is before': (from: string, to: string) => ['LessThan', from, to], | ||
'is after': (from: string, to: string) => ['GreaterThan', from, to], | ||
}, | ||
}; | ||
export const validate = TypeUtils.validate.date; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102890
1671
2