@juice789/tf2items 1.0.19 → 1.0.21
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/blanket.js +6 -7
- package/fromEconItem.js +12 -13
- package/fromListingV1.js +13 -13
- package/fromListingV2.js +3 -3
- package/package.json +5 -5
- package/schema.json +1 -1
- package/sku.js +2 -2
- package/toSearchParams.js +3 -3
- package/transformItems.js +10 -10
package/sku.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const {
|
|
2
|
-
compose, split, map, reduce, pickBy, mergeRight, converge, concat,
|
|
2
|
+
compose, split, map, reduce, pickBy, mergeRight, converge, concat, join, head, tail, filter
|
|
3
3
|
} = require('ramda')
|
|
4
4
|
|
|
5
5
|
const {
|
|
@@ -73,7 +73,7 @@ const decodeRules = compose(
|
|
|
73
73
|
map(
|
|
74
74
|
compose(
|
|
75
75
|
([k, value = true]) => ({ [rules[k]]: value }),
|
|
76
|
-
converge(concat, [compose(of, head), compose(filter(Boolean), of, join('-'), tail)]),
|
|
76
|
+
converge(concat, [compose(Array.of, head), compose(filter(Boolean), Array.of, join('-'), tail)]),
|
|
77
77
|
split('-')
|
|
78
78
|
)
|
|
79
79
|
)
|
package/toSearchParams.js
CHANGED
|
@@ -33,7 +33,7 @@ const quality = ({
|
|
|
33
33
|
: quality
|
|
34
34
|
|
|
35
35
|
const australium = ifElse(
|
|
36
|
-
propEq('australium'
|
|
36
|
+
propEq(true, 'australium'),
|
|
37
37
|
always(1),
|
|
38
38
|
always(-1)
|
|
39
39
|
)
|
|
@@ -44,7 +44,7 @@ const killstreak_tier = compose(
|
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
const craftable = ifElse(
|
|
47
|
-
propEq('uncraftable'
|
|
47
|
+
propEq(true, 'uncraftable'),
|
|
48
48
|
always(-1),
|
|
49
49
|
always(1)
|
|
50
50
|
)
|
|
@@ -64,7 +64,7 @@ const texture_name = compose(prop(__, textures), prop('texture'))
|
|
|
64
64
|
|
|
65
65
|
const elevated = ifElse(
|
|
66
66
|
allPass([
|
|
67
|
-
propEq('elevated'
|
|
67
|
+
propEq(true, 'elevated'),
|
|
68
68
|
compose(
|
|
69
69
|
complement(includes)(__, ['701', '702', '703', '704']),
|
|
70
70
|
prop('effect')
|
package/transformItems.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { prop, pick, map, compose, complement, includes, equals, length, allPass, mapObjIndexed, when, has, __, chain, assoc, pathEq, omit, split, keys, propEq, propOr, nth,
|
|
1
|
+
const { prop, pick, map, compose, complement, includes, equals, length, allPass, mapObjIndexed, when, has, __, chain, assoc, pathEq, omit, split, keys, propEq, propOr, nth, range, path, uncurryN, mergeDeepRight, reduce, concat } = require('ramda')
|
|
2
2
|
const { qualityIds, strangifierTargets, crateSeries, chemsetDefindex } = require('./schemaHelper.json')
|
|
3
3
|
|
|
4
4
|
const propsToKeep = [
|
|
@@ -23,7 +23,7 @@ const transformItems = uncurryN(3, (collections, itemsApi) => compose(
|
|
|
23
23
|
map((item) => mergeDeepRight(collections[item.name], item)),
|
|
24
24
|
reduce(mergeDeepRight, {}),
|
|
25
25
|
concat([itemsApi, crateSeries, strangifierTargets, chemsetDefindex]),
|
|
26
|
-
of,
|
|
26
|
+
Array.of,
|
|
27
27
|
map(
|
|
28
28
|
compose(
|
|
29
29
|
pick(propsToKeep),
|
|
@@ -56,7 +56,7 @@ const transformItems = uncurryN(3, (collections, itemsApi) => compose(
|
|
|
56
56
|
),
|
|
57
57
|
when(
|
|
58
58
|
path(['static_attrs', 'tool target item']),
|
|
59
|
-
chain(assoc('target'), compose(of, path(['static_attrs', 'tool target item'])))
|
|
59
|
+
chain(assoc('target'), compose(Array.of, path(['static_attrs', 'tool target item'])))
|
|
60
60
|
),
|
|
61
61
|
when(
|
|
62
62
|
path(['static_attrs', 'hide crate series number']),
|
|
@@ -64,26 +64,26 @@ const transformItems = uncurryN(3, (collections, itemsApi) => compose(
|
|
|
64
64
|
),
|
|
65
65
|
when(
|
|
66
66
|
path(['static_attrs', 'set supply crate series']),
|
|
67
|
-
chain(assoc('series'), compose(of, path(['static_attrs', 'set supply crate series'])))
|
|
67
|
+
chain(assoc('series'), compose(Array.of, path(['static_attrs', 'set supply crate series'])))
|
|
68
68
|
),
|
|
69
69
|
when(
|
|
70
70
|
path(['attributes', 'tool target item', 'value']),
|
|
71
|
-
chain(assoc('target'), compose(of, path(['attributes', 'tool target item', 'value'])))
|
|
71
|
+
chain(assoc('target'), compose(Array.of, path(['attributes', 'tool target item', 'value'])))
|
|
72
72
|
),
|
|
73
73
|
when(
|
|
74
|
-
pathEq(['tags', 'can_be_festivized']
|
|
74
|
+
pathEq('1', ['tags', 'can_be_festivized']),
|
|
75
75
|
assoc('festivized', '1')
|
|
76
76
|
),
|
|
77
77
|
when(
|
|
78
|
-
pathEq(['attributes', 'cannot trade', 'value']
|
|
78
|
+
pathEq('1', ['attributes', 'cannot trade', 'value']),
|
|
79
79
|
assoc('untradable', '1')
|
|
80
80
|
),
|
|
81
81
|
when(
|
|
82
|
-
pathEq(['tool', 'type']
|
|
82
|
+
pathEq('paint_can', ['tool', 'type']),
|
|
83
83
|
assoc('type2', 'paint')
|
|
84
84
|
),
|
|
85
85
|
when(
|
|
86
|
-
pathEq(['tool', 'type']
|
|
86
|
+
pathEq('decoder_ring', ['tool', 'type']),
|
|
87
87
|
assoc('type2', 'key')
|
|
88
88
|
),
|
|
89
89
|
when(
|
|
@@ -93,7 +93,7 @@ const transformItems = uncurryN(3, (collections, itemsApi) => compose(
|
|
|
93
93
|
when(
|
|
94
94
|
allPass([
|
|
95
95
|
compose(includes('paintkitweapon'), propOr('', 'item_quality')),
|
|
96
|
-
complement(propEq)('
|
|
96
|
+
complement(propEq)('9536', 'defindex')
|
|
97
97
|
]),
|
|
98
98
|
chain(assoc('texture'), path(['static_attrs', 'paintkit_proto_def_index']))
|
|
99
99
|
)
|