@balena/sbvr-types
Advanced tools
Comparing version
@@ -7,2 +7,9 @@ # Change Log | ||
# v3.2.0 | ||
## (2021-01-29) | ||
* Add support for the `contains` verb to the text type [Thodoris Greasidis] | ||
* Add support for the`ends with` verb to the text type [Thodoris Greasidis] | ||
* Add support for the `starts with` verb to the text type [Thodoris Greasidis] | ||
# v3.1.3 | ||
@@ -9,0 +16,0 @@ ## (2020-12-11) |
@@ -16,2 +16,6 @@ export declare const types: { | ||
Text: { | ||
'starts with': (from: string, to: string) => string[]; | ||
'ends with': (from: string, to: string) => string[]; | ||
contains: (from: string, to: string) => string[]; | ||
'is contained in': (from: string, to: string) => string[]; | ||
'is equal to': (from: string, to: string) => string[]; | ||
@@ -18,0 +22,0 @@ equals: (from: string, to: string) => string[]; |
@@ -19,5 +19,11 @@ "use strict"; | ||
exports.nativeFactTypes = { | ||
Text: TypeUtils.nativeFactTypeTemplates.equality, | ||
Text: { | ||
...TypeUtils.nativeFactTypeTemplates.equality, | ||
'starts with': (from, to) => ['Startswith', from, to], | ||
'ends with': (from, to) => ['Endswith', from, to], | ||
contains: (from, to) => ['Contains', from, to], | ||
'is contained in': (from, to) => ['Contains', to, from], | ||
}, | ||
}; | ||
exports.validate = TypeUtils.validate.text(); | ||
//# sourceMappingURL=text.js.map |
{ | ||
"name": "@balena/sbvr-types", | ||
"version": "3.1.3", | ||
"version": "3.2.0-add-starts-with-8e074867c7b94f99664b14caaebeddb5e9f1fe9c", | ||
"description": "SBVR type definitions.", | ||
@@ -5,0 +5,0 @@ "main": "out", |
@@ -19,5 +19,11 @@ import * as TypeUtils from '../type-utils'; | ||
export const nativeFactTypes = { | ||
Text: TypeUtils.nativeFactTypeTemplates.equality, | ||
Text: { | ||
...TypeUtils.nativeFactTypeTemplates.equality, | ||
'starts with': (from: string, to: string) => ['Startswith', from, to], | ||
'ends with': (from: string, to: string) => ['Endswith', from, to], | ||
contains: (from: string, to: string) => ['Contains', from, to], | ||
'is contained in': (from: string, to: string) => ['Contains', to, from], | ||
}, | ||
}; | ||
export const validate = TypeUtils.validate.text(); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
99691
2.48%1627
0.99%2
100%