@barchart/portfolio-api-common 1.0.57 → 1.0.58
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.
|
@@ -77,7 +77,8 @@ module.exports = (() => {
|
|
|
77
77
|
const currentDefinition = definitions[0];
|
|
78
78
|
const additionalDefinitions = array.dropLeft(definitions);
|
|
79
79
|
|
|
80
|
-
const
|
|
80
|
+
const populatedObjects = array.groupBy(items, currentDefinition.keySelector);
|
|
81
|
+
const populatedGroups = Object.keys(populatedObjects).map(key => populatedObjects[key]).map((items) => {
|
|
81
82
|
const first = items[0];
|
|
82
83
|
|
|
83
84
|
return new PositionGroup(items, currentDefinition.currencySelector(first), currentDefinition.descriptionSelector(first), currentDefinition.single && items.length === 1);
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -592,7 +592,8 @@ module.exports = (() => {
|
|
|
592
592
|
const currentDefinition = definitions[0];
|
|
593
593
|
const additionalDefinitions = array.dropLeft(definitions);
|
|
594
594
|
|
|
595
|
-
const
|
|
595
|
+
const populatedObjects = array.groupBy(items, currentDefinition.keySelector);
|
|
596
|
+
const populatedGroups = Object.keys(populatedObjects).map(key => populatedObjects[key]).map((items) => {
|
|
596
597
|
const first = items[0];
|
|
597
598
|
|
|
598
599
|
return new PositionGroup(items, currentDefinition.currencySelector(first), currentDefinition.descriptionSelector(first), currentDefinition.single && items.length === 1);
|