@openframe-org/criteria-set-protocol 2.7.11 → 2.7.13

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.
@@ -73,7 +73,7 @@ export declare const isNil: (value: unknown) => value is null | undefined;
73
73
  /**
74
74
  * Given a list of certification definitions, return the ones for which the given value is valid
75
75
  */
76
- export declare const getCertificationsByValue: (certificationDefinitions: CertificationDefinition[], value?: TaskItemValueReference) => CertificationDefinition[] | undefined;
76
+ export declare const getCertificationsByValue: (certificationDefinitions: CertificationDefinition[], value?: number | boolean | null) => CertificationDefinition[];
77
77
  /**
78
78
  * Given a tree element or a data object, validate that it contains valid data. If it is a tree element,
79
79
  * extract the data object from it and validate it:
package/dist/v1/utils.js CHANGED
@@ -78,7 +78,7 @@ exports.isNil = isNil;
78
78
  */
79
79
  const getCertificationsByValue = (certificationDefinitions, value) => {
80
80
  if (typeof value !== "number") {
81
- return undefined;
81
+ return [];
82
82
  }
83
83
  return certificationDefinitions.filter((definition) => {
84
84
  return (((0, exports.isNil)(definition.rules.minimum) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "2.7.11",
3
+ "version": "2.7.13",
4
4
  "description": "A protocol and tools for defining and working with criteria sets",
5
5
  "private": false,
6
6
  "author": "Andrés Angulo <aa@openframe.org>",