@socialgouv/kali-data-types 2.625.0 → 2.626.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/package.json
CHANGED
|
@@ -10,7 +10,9 @@ const INDEXED_AGREEMENTS =
|
|
|
10
10
|
* @returns {KaliData.IndexedAgreement[]}
|
|
11
11
|
*/
|
|
12
12
|
function getAgreements() {
|
|
13
|
-
|
|
13
|
+
const containsId = convention => typeof convention.id === "string";
|
|
14
|
+
|
|
15
|
+
return INDEXED_AGREEMENTS.filter(containsId);
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
module.exports = getAgreements;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
const INDEXED_AGREEMENTS =
|
|
4
|
+
/** @type {KaliData.IndexedAgreement[]} */
|
|
5
|
+
(require("../../data/index.json"));
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get the full list of indexed agreements.
|
|
9
|
+
*
|
|
10
|
+
* @returns {KaliData.IndexedAgreement[]}
|
|
11
|
+
*/
|
|
12
|
+
function getAgreementsWithNoId() {
|
|
13
|
+
const containsNoId = convention => typeof convention.id === "undefined";
|
|
14
|
+
|
|
15
|
+
return INDEXED_AGREEMENTS.filter(containsNoId);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = getAgreementsWithNoId;
|