@baravak/risloo-profile-cli 4.0.0 → 4.1.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baravak/risloo-profile-cli",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "**Risloo Profile CLI** is a library for creating profiles, reports and sheets for *psychological* samples.",
5
5
  "main": "bin/risloo.js",
6
6
  "publishConfig": {
@@ -118,20 +118,20 @@ class SCL9093 extends Profile {
118
118
  const items = [];
119
119
  for(let i = 0; i < 40; i+=4){
120
120
  const item = {
121
- raw:dataset.score[i].mark,
121
+ raw:dataset.score[i].mark || 0,
122
122
  title: dataset.score[i].label.fr,
123
123
  en: dataset.score[i].label.en,
124
- mean: toFixed(dataset.score[i+1].mark),
124
+ mean: toFixed(dataset.score[i+1].mark || 0),
125
125
  };
126
126
  item.params = setByPr(item, dataset.score[i+3].mark || 0)
127
127
 
128
128
  items.push(item);
129
129
  }
130
130
  const colors = colorLevel.map((c, i) => ({start: colorSubLevel[i], end: c}))
131
- const total = dataset.score[40].mark;
132
- const pst = dataset.score[41].mark;
133
- const gsi = toFixed(dataset.score[42].mark);
134
- const psdi = toFixed(dataset.score[43].mark);
131
+ const total = dataset.score[40].mark || 0;
132
+ const pst = dataset.score[41].mark || 0;
133
+ const gsi = toFixed(dataset.score[42].mark || 0);
134
+ const psdi = toFixed(dataset.score[43].mark || 0);
135
135
  return [{ colors, items, total, pst, gsi, psdi }];
136
136
  }
137
137
  }