azul-steam-inventory-loader 3.2.1 → 3.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azul-steam-inventory-loader",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Steam Inventory Loader By Azul, faster than node-steamcommunity on average, bult-in error retry, and memory friendly when using --expose-gc",
5
5
  "main": "azul.js",
6
6
  "types": "index.d.ts",
package/test/AzulRaw.js DELETED
@@ -1,23 +0,0 @@
1
- const Azul = require('../');
2
- const cfg = require('./Config');
3
- const {formatNumber} = require('azul-tools');
4
-
5
- process.nextTick(async () => {
6
- const id = cfg.SteamID;
7
-
8
- const TimeKey = `Azul Loader (${id})`;
9
- console.log(`Testing Azul Loader`);
10
-
11
- console.time(TimeKey);
12
- const Inventory = await Azul.Loader(id,cfg.AppID,cfg.contextid);
13
- console.log(`Inventory Size: ${formatNumber(Inventory.count)} items`);
14
- console.log(`Memory Usage: ${require('./Memory')()}`);
15
- console.timeEnd(TimeKey);
16
- // clearInterval(interval);
17
- })
18
-
19
- /* let i = 0;
20
- const interval = setInterval(()=> {
21
- i++
22
- console.log(`${i} seconds`)
23
- }, 1000) */
package/test/Config.js DELETED
@@ -1,10 +0,0 @@
1
- const ids = {
2
- small: "76561198358742001",
3
- big: "76561198356905764"
4
- }
5
-
6
- module.exports = {
7
- SteamID: ids.small,
8
- AppID: "753",
9
- contextid: "6"
10
- }
package/test/Memory.js DELETED
@@ -1,2 +0,0 @@
1
- const used = process.memoryUsage().heapUsed / 1024 / 1024;
2
- module.exports = () => `${Math.round(used * 100) / 100} MB`;
@@ -1,39 +0,0 @@
1
- const SteamCommunity = require('steamcommunity');
2
- const Community = new SteamCommunity();
3
-
4
- const Loader = (id) => {
5
- return new Promise((resolve, reject) => {
6
-
7
- Community.getUserInventoryContents(id, cfg.AppID, cfg.contextid, true, (err, inventory) => {
8
- if (!err) {
9
- resolve(inventory);
10
- return;
11
- }
12
-
13
- if (err) reject(err);
14
- });
15
- });
16
- }
17
-
18
- const cfg = require('./Config');
19
- const {formatNumber} = require('azul-tools');
20
-
21
- process.nextTick(async () => {
22
- const id = cfg.SteamID;
23
-
24
- const TimeKey = `SteamCommunity Loader (${id})`;
25
- console.log(`Testing SteamCommunity Loader`);
26
-
27
- console.time(TimeKey);
28
- const Inventory = await Loader(id);
29
- console.log(`Inventory Size: ${formatNumber(Inventory.length)} items`);
30
- console.log(`Memory Usage: ${require('./Memory')()}`);
31
- console.timeEnd(TimeKey);
32
- // clearInterval(interval);
33
- })
34
-
35
- /* let i = 0;
36
- const interval = setInterval(()=> {
37
- i++
38
- console.log(`${i} seconds`)
39
- }, 1000) */