warframe-worldstate-parser 2.25.5 → 2.25.6
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/README.md +8 -0
- package/lib/WorldState.js +5 -3
- package/package.json +1 -1
- package/types/lib/WorldState.d.ts +1 -0
package/README.md
CHANGED
|
@@ -10,6 +10,14 @@ Parse the Warframe worldstate into useable javascript objects.
|
|
|
10
10
|
## Documentation
|
|
11
11
|
You can find the documentation [here](https://wfcd.github.io/warframe-worldstate-parser/)
|
|
12
12
|
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
$ npm i -S warframe-worldstate-parser
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
For the most part, you'll have a better experience consuming the product of this from the information in [Live version](#live-version)
|
|
20
|
+
|
|
13
21
|
## Example usage
|
|
14
22
|
|
|
15
23
|
```javascript
|
package/lib/WorldState.js
CHANGED
|
@@ -91,9 +91,7 @@ function parseArray(ParserClass, dataArray, deps, uniqueField) {
|
|
|
91
91
|
utemp[obj[uniqueField]] = obj;
|
|
92
92
|
});
|
|
93
93
|
return Array.from(arr).filter((obj) => {
|
|
94
|
-
if (
|
|
95
|
-
return obj.active;
|
|
96
|
-
}
|
|
94
|
+
if (obj && obj.active && typeof obj.active !== 'undefined') return obj.active;
|
|
97
95
|
/* istanbul ignore next */
|
|
98
96
|
return true;
|
|
99
97
|
});
|
|
@@ -306,6 +304,10 @@ module.exports = class WorldState {
|
|
|
306
304
|
arbitration: this.arbitration,
|
|
307
305
|
} = externalMissions);
|
|
308
306
|
|
|
307
|
+
if (!this.arbitration || !Object.keys(this.arbitration).length) {
|
|
308
|
+
this.arbitration = undefined;
|
|
309
|
+
}
|
|
310
|
+
|
|
309
311
|
/**
|
|
310
312
|
* Current syndicate outposts
|
|
311
313
|
* @type {SentientOutpost}
|
package/package.json
CHANGED