@barchart/portfolio-api-common 1.29.1 → 1.29.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.
@@ -463,10 +463,17 @@ module.exports = (() => {
463
463
  *
464
464
  * @public
465
465
  * @param {Boolean} display - If true, all "display" symbols are returned; otherwise Barchart symbols are returned.
466
+ * @param {Boolean} excludeExpired - If true, only non-expired symbols are filtered.
466
467
  * @returns {String[]}
467
468
  */
468
- getPositionSymbols(display) {
469
- const symbols = this._items.reduce((symbols, item) => {
469
+ getPositionSymbols(display, excludeExpired) {
470
+ let items = this._items;
471
+
472
+ if (excludeExpired) {
473
+ items = items.filter(item => !item.data.expired);
474
+ }
475
+
476
+ const symbols = items.reduce((symbols, item) => {
470
477
  const position = item.position;
471
478
 
472
479
  let symbol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.29.1",
3
+ "version": "1.29.2",
4
4
  "description": "Common JavaScript code used by Barchart's Portfolio Service",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",