@juice789/tf2items 1.0.30 → 1.0.32
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/fromEconItem.js +44 -20
- package/package.json +1 -1
- package/schema.json +1 -1
- package/schemaHelper.json +2 -1
- package/sku753.js +28 -0
package/schemaHelper.json
CHANGED
|
@@ -269,7 +269,8 @@
|
|
|
269
269
|
"Winter 2023 Cosmetics Collection",
|
|
270
270
|
"Summer 2024 Cosmetics Collection",
|
|
271
271
|
"Terrifying Trove Collection",
|
|
272
|
-
"Winter 2024 Cosmetics Collection"
|
|
272
|
+
"Winter 2024 Cosmetics Collection",
|
|
273
|
+
"Summer 2025 Cosmetics Collection"
|
|
273
274
|
],
|
|
274
275
|
"weaponCollections": [
|
|
275
276
|
"Concealed Killer Collection",
|
package/sku753.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const skuFromItem753 = ({
|
|
2
|
+
market_hash_name,
|
|
3
|
+
game,
|
|
4
|
+
border,
|
|
5
|
+
type,
|
|
6
|
+
}) => [
|
|
7
|
+
753,
|
|
8
|
+
type === '2' ? `${type}-${border}` : type,
|
|
9
|
+
game,
|
|
10
|
+
encodeURIComponent(market_hash_name)
|
|
11
|
+
].filter(Boolean).join(';')
|
|
12
|
+
|
|
13
|
+
const itemFromSku753 = (sku) => {
|
|
14
|
+
const [x, type, game, market_hash_name] = sku.split(';')
|
|
15
|
+
const item = {
|
|
16
|
+
type,
|
|
17
|
+
border: type[1],
|
|
18
|
+
game,
|
|
19
|
+
market_hash_name: decodeURIComponent(market_hash_name)
|
|
20
|
+
}
|
|
21
|
+
item.sku = sku
|
|
22
|
+
return item
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
skuFromItem753,
|
|
27
|
+
itemFromSku753
|
|
28
|
+
}
|