@juice789/tf2items 1.0.6 → 1.0.7

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/skuBp.js +14 -2
  3. package/options.json +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juice789/tf2items",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "tf2 item schema thingys",
5
5
  "main": "app.js",
6
6
  "scripts": {
package/skuBp.js CHANGED
@@ -57,7 +57,7 @@ const toBpPriceIndex = (sku) => {
57
57
  ].filter(Boolean).join('/')
58
58
  }
59
59
 
60
- const listingFromSku = (sku) => {
60
+ const listingV1FromSku = (sku) => {
61
61
  const { uncraftable } = itemFromSku(sku)
62
62
  return {
63
63
  quality: toBpQuality(sku),
@@ -67,6 +67,17 @@ const listingFromSku = (sku) => {
67
67
  }
68
68
  }
69
69
 
70
+ const listingV2ResolvableFromSku = (sku) => {
71
+ const { uncraftable } = itemFromSku(sku)
72
+ return {
73
+ quality: toBpQuality(sku),
74
+ craftable: uncraftable ? '0' : '1',
75
+ item: toBpName(sku),
76
+ tradable: '1',
77
+ priceindex: toBpPriceIndex(sku)
78
+ }
79
+ }
80
+
70
81
  const toBpSku = (sku) => {
71
82
  const item = omit(
72
83
  ['craft'],
@@ -82,6 +93,7 @@ module.exports = {
82
93
  toBpName,
83
94
  toBpId,
84
95
  toBpPriceIndex,
85
- listingFromSku,
96
+ listingV1FromSku,
97
+ listingV2ResolvableFromSku,
86
98
  toBpSku
87
99
  }
package/options.json DELETED
@@ -1 +0,0 @@
1
- {"steamApiKey": "1E55C647593C029A0C9BE22F97F03F03"}