@barchart/portfolio-api-common 1.28.0 → 1.29.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.
@@ -36,7 +36,7 @@ module.exports = (() => {
36
36
  }
37
37
 
38
38
  /**
39
- * Indicates if the position size is positive (i.e. is {@link PositionDirection.LONG}).
39
+ * Indicates if the position size is positive (i.e. {@link PositionDirection#LONG}).
40
40
  *
41
41
  * @public
42
42
  * @returns {boolean}
@@ -46,7 +46,7 @@ module.exports = (() => {
46
46
  }
47
47
 
48
48
  /**
49
- * Indicates if the position size is negative (i.e. is {@link PositionDirection.SHORT}).
49
+ * Indicates if the position size is negative (i.e. {@link PositionDirection#SHORT}).
50
50
  *
51
51
  * @public
52
52
  * @returns {boolean}
@@ -56,7 +56,18 @@ module.exports = (() => {
56
56
  }
57
57
 
58
58
  /**
59
- * Indicates if the position size is zero (i.e. is {@link PositionDirection.EVEN}).
59
+ * Indicates if the position size is zero (i.e. {@link PositionDirection#LONG} or
60
+ * {@link PositionDirection#SHORT}).
61
+ *
62
+ * @public
63
+ * @returns {boolean}
64
+ */
65
+ get open() {
66
+ return this !== even;
67
+ }
68
+
69
+ /**
70
+ * Indicates if the position size is zero (i.e. {@link PositionDirection#EVEN}).
60
71
  *
61
72
  * @public
62
73
  * @returns {boolean}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "description": "Common JavaScript code used by Barchart's Portfolio Service",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",