testilo 47.1.0 → 47.1.2
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 +1 -1
- package/procs/excerpts/excerpts.js +11 -4
- package/procs/score/tic.js +1 -1
package/package.json
CHANGED
|
@@ -72,10 +72,17 @@ exports.collateExcerpts = report => {
|
|
|
72
72
|
if (Object.keys(texts).length) {
|
|
73
73
|
// For each path ID in it:
|
|
74
74
|
Object.keys(texts).forEach(pathID => {
|
|
75
|
-
|
|
76
|
-
//
|
|
75
|
+
let toolNames = Object.keys(texts[pathID]);
|
|
76
|
+
// Delete all empty texts.
|
|
77
|
+
toolNames.forEach(toolName => {
|
|
78
|
+
if (! texts[pathID][toolName]) {
|
|
79
|
+
delete texts[pathID][toolName];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
toolNames = Object.keys(texts[pathID]);
|
|
83
|
+
// If the element has only 1 remaining text:
|
|
77
84
|
if (toolNames.length === 1) {
|
|
78
|
-
// Change
|
|
85
|
+
// Change its key to unanimous.
|
|
79
86
|
texts[pathID].unanimous = texts[pathID][toolNames[0]];
|
|
80
87
|
delete texts[pathID][toolNames[0]];
|
|
81
88
|
}
|
|
@@ -91,7 +98,7 @@ exports.collateExcerpts = report => {
|
|
|
91
98
|
// Consolidate the texts to 1 unanimous text.
|
|
92
99
|
texts[pathID].unanimous = texts[pathID][toolNames[0]];
|
|
93
100
|
toolNames.forEach(toolName => {
|
|
94
|
-
if (toolName !==
|
|
101
|
+
if (toolName !== 'unanimous') {
|
|
95
102
|
delete texts[pathID][toolName];
|
|
96
103
|
}
|
|
97
104
|
});
|
package/procs/score/tic.js
CHANGED