@juice789/tf2items 1.0.38 → 2.0.0

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 CHANGED
@@ -1,74 +1,37 @@
1
- const {
2
- compose,
3
- includes,
4
- prop,
5
- propOr,
6
- find,
7
- flip,
8
- map,
9
- when,
10
- unary,
11
- allPass,
12
- propEq,
13
- uncurryN,
14
- chain,
15
- __,
16
- ifElse,
17
- has,
18
- always,
19
- curry,
20
- applyTo,
21
- assoc,
22
- pathOr,
23
- invertObj,
24
- mergeRight,
25
- values,
26
- replace,
27
- trim,
28
- reduce,
29
- nth,
30
- split,
31
- propSatisfies,
32
- pathEq,
33
- complement,
34
- either,
35
- concat,
36
- path,
37
- equals,
38
- pick,
39
- assocPath,
40
- isEmpty,
41
- join,
42
- filter,
43
- omit,
44
- last,
45
- defaultTo,
46
- renameKeys
47
- } = require('ramda')
48
-
49
- const { safeItems: items } = require('./schemaItems.js')
50
- const { particleEffects, textures } = require('./schema.json')
51
- const { qualityNames, wears, paintDefindex, spellDefindex } = require('./schemaHelper.json')
52
- const { skuFromItem } = require('./sku.js')
53
- const { skuFromItem753 } = require('./sku753.js')
54
-
55
- const marketHashIncludes = curry((string, { market_hash_name }) => market_hash_name.indexOf(string) !== -1)
56
-
57
- const removeStrings = curry((string, strings) => compose(
58
- trim,
59
- replace(/\s\s+/g, ' '),
60
- reduce((all, curr) => replace(curr, '', all), string || '')
61
- )(strings))
62
-
63
- const findTag = uncurryN(3, (tagName, displayProp) => compose(
64
- prop(displayProp),
65
- find(propEq(tagName, 'category_name')),
66
- map(renameKeys({
67
- localized_category_name: 'category_name',
68
- localized_tag_name: 'name'
69
- })),
70
- propOr([], 'tags')
71
- ))
1
+ import { safeItems as items } from './schemaItems.js'
2
+ import schema from './schema.json' with { type: 'json' }
3
+ import schemaHelper from './schemaHelper.json' with { type: 'json' }
4
+ const { particleEffects, textures } = schema
5
+ const { qualityNames, wears, paintDefindex, spellDefindex, rchDefindex } = schemaHelper
6
+ import { skuFromItem } from './sku.js'
7
+ import { skuFromItem753 } from './sku753.js'
8
+
9
+ const invertObj = obj => Object.fromEntries(Object.entries(obj).map(([k, v]) => [v, k]))
10
+
11
+ const wearsInv = invertObj(wears)
12
+ const texturesInv = invertObj(textures)
13
+ const particleEffectsInv = invertObj(particleEffects)
14
+ const qualityNamesInv = invertObj(qualityNames)
15
+ const rchSet = new Set(rchDefindex)
16
+
17
+ function removeStrings(string, strings) {
18
+ return strings
19
+ .reduce((acc, curr) => acc.replace(curr, ''), string || '')
20
+ .replace(/\s\s+/g, ' ')
21
+ .trim()
22
+ }
23
+
24
+ function findTag(tagName, displayProp, item) {
25
+ const tag = (item.tags ?? [])
26
+ .map(t => {
27
+ const out = { ...t }
28
+ if ('localized_category_name' in out) { out.category_name = out.localized_category_name; delete out.localized_category_name }
29
+ if ('localized_tag_name' in out) { out.name = out.localized_tag_name; delete out.localized_tag_name }
30
+ return out
31
+ })
32
+ .find(t => t.category_name === tagName)
33
+ return tag?.[displayProp]
34
+ }
72
35
 
73
36
  const old_id = ({ new_assetid, rollback_new_assetid, assetid }) => (new_assetid || rollback_new_assetid) ? assetid : null
74
37
 
@@ -78,148 +41,111 @@ const old_contextid = ({ new_contextid, rollback_new_contextid, contextid }) =>
78
41
 
79
42
  const contextid = ({ new_contextid, rollback_new_contextid, contextid }) => new_contextid || rollback_new_contextid || contextid || null
80
43
 
81
- const appid = ({ appid }) => appid
82
-
83
- const recipe = compose(
84
- find(__, ['Fabricator', 'Strangifier Chemistry Set', 'Chemistry Set']),
85
- flip(marketHashIncludes),
86
- )
87
-
88
- const series = ifElse(
89
- compose(equals('Crate'), findTag('Type', 'name')),
90
- ifElse(
91
- marketHashIncludes('#'),
92
- compose(
93
- nth(1),
94
- split('#'),
95
- prop('market_hash_name')
96
- ),
97
- compose(
98
- nth(0),
99
- propOr([], 'series'),
100
- prop(__, items),
101
- path(['app_data', 'def_index'])
102
- )
103
- ),
104
- always(null)
105
- )
106
-
107
- const craft = ifElse(
108
- allPass([
109
- propSatisfies(includes('#'), 'name'),
110
- propSatisfies(complement(includes)('#'), 'market_hash_name'),
111
- ]),
112
- compose(
113
- nth(1),
114
- split('#'),
115
- prop('name')
116
- ),
117
- always(null)
118
- )
119
-
120
- const australium = allPass([
121
- pathEq('11', ['app_data', 'quality']),
122
- marketHashIncludes('Australium')
123
- ])
124
-
125
- const wear = compose(
126
- prop(__, invertObj(wears)),
127
- removeStrings(__, ['(', ')']),
128
- findTag('Exterior', 'name')
129
- )
130
-
131
- const texture = ifElse(
132
- findTag('Exterior', 'name'),
133
- compose(
134
- propOr('-1', __, invertObj(textures)),
135
- ({ app_data, market_hash_name }) => removeStrings(market_hash_name, [
136
- 'Specialized Killstreak',
137
- 'Professional Killstreak',
138
- 'Killstreak',
139
- '(Field-Tested)',
140
- '(Well-Worn)',
141
- '(Battle Scarred)',
142
- '(Minimal Wear)',
143
- '(Factory New)',
144
- 'Festivized',
145
- 'Strange',
146
- qualityNames[app_data.quality],
147
- items[app_data.def_index].item_name
148
- ])
149
- ),
150
- always(null)
151
- )
152
-
153
- const festivized = marketHashIncludes('Festivized')
154
-
155
- const killstreakTier = compose(
156
- prop(__, { 'Professional Killstreak': '3', 'Specialized Killstreak': '2', 'Killstreak': '1' }),
157
- find(__, ['Professional Killstreak', 'Specialized Killstreak', 'Killstreak']),
158
- flip(marketHashIncludes)
159
- )
160
-
161
- const effect = ifElse(
162
- allPass([
163
- pathEq('5', ['app_data', 'quality']),
164
- compose(
165
- find(propEq('ffd700', 'color')),
166
- propOr([], 'descriptions')
167
- )
168
- ]),
169
- compose(
170
- propOr('-1', __, invertObj(particleEffects)),
171
- replace('★ Unusual Effect: ', ''),
172
- prop('value'),
173
- find(propEq('ffd700', 'color')),
174
- propOr([], 'descriptions')
175
- ),
176
- always(null)
177
- )
178
-
179
- const elevated = allPass([
180
- complement(pathEq)('11', ['app_data', 'quality']),
181
- compose(
182
- includes('Strange'),
183
- ({ app_data, market_hash_name }) => replace(items[app_data.def_index].item_name, '', market_hash_name)
184
- )
185
- ])
186
-
187
- const uncraftable = compose(
188
- Boolean,
189
- find(propEq('( Not Usable in Crafting )', 'value')),
190
- propOr([], 'descriptions')
191
- )
192
-
193
- const paintOptions = Object.keys(paintDefindex).map(paintName => `Paint Color: ${paintName}`)
194
-
195
- const paintColor = compose(
196
- when(Boolean, ({ value }) => paintDefindex[value.split('Paint Color: ')[1]]),
197
- find(compose(includes(__, paintOptions), prop('value'))),
198
- propOr([], 'descriptions')
199
- )
200
-
201
- const spellOptions = Object.keys(spellDefindex).map(spellName => `Halloween: ${spellName} (spell only active during event)`)
202
-
203
- const halloweenSpell = compose(
204
- when(isEmpty, always(null)),
205
- join('_'),
206
- map(({ value }) => spellDefindex[value.split('Halloween: ')[1].replace(' (spell only active during event)', '')]),
207
- filter(compose(includes(__, spellOptions), prop('value'))),
208
- propOr([], 'descriptions')
209
- )
210
-
211
- const market_hash_name = prop('market_hash_name')
212
-
213
- const setQuality = when(
214
- compose(complement(Boolean), path(['app_data', 'quality'])),
215
- chain(
216
- assocPath(['app_data', 'quality']),
217
- compose(prop(__, invertObj(qualityNames)), findTag('Quality', 'name'))
218
- )
219
- )
220
-
221
- const quality = pathOr('-1', ['app_data', 'quality'])
222
- const defindex = pathOr('-1', ['app_data', 'def_index'])
44
+ const appid = item => item.appid
45
+
46
+ const recipe = item =>
47
+ ['Fabricator', 'Strangifier Chemistry Set', 'Chemistry Set']
48
+ .find(s => item.market_hash_name.indexOf(s) !== -1) || null
49
+
50
+ function series(item) {
51
+ if (findTag('Type', 'name', item) !== 'Crate') return null
52
+ if (item.market_hash_name.indexOf('#') !== -1) return item.market_hash_name.split('#')[1]
53
+ return (items[item?.app_data?.def_index]?.series ?? [])[0]
54
+ }
55
+
56
+ const craft = item =>
57
+ item.name?.includes('#') && !item.market_hash_name?.includes('#')
58
+ ? item.name.split('#')[1]
59
+ : null
60
+
61
+ const australium = item =>
62
+ item?.app_data?.quality === '11' && item.market_hash_name.indexOf('Australium') !== -1
63
+
64
+ const wear = item => {
65
+ const wearName = findTag('Exterior', 'name', item)
66
+ if (!wearName) return undefined
67
+ return wearsInv[removeStrings(wearName, ['(', ')'])]
68
+ }
69
+
70
+ function texture(item) {
71
+ if (!findTag('Exterior', 'name', item)) return null
72
+ const name = removeStrings(item.market_hash_name, [
73
+ 'Specialized Killstreak',
74
+ 'Professional Killstreak',
75
+ 'Killstreak',
76
+ '(Field-Tested)',
77
+ '(Well-Worn)',
78
+ '(Battle Scarred)',
79
+ '(Minimal Wear)',
80
+ '(Factory New)',
81
+ 'Festivized',
82
+ 'Strange',
83
+ qualityNames[item.app_data.quality],
84
+ items[item.app_data.def_index].item_name
85
+ ])
86
+ return texturesInv[name] ?? '-1'
87
+ }
88
+
89
+ const festivized = item => item.market_hash_name.indexOf('Festivized') !== -1
90
+
91
+ const ksMap = {
92
+ 'Professional Killstreak': '3',
93
+ 'Specialized Killstreak': '2',
94
+ 'Killstreak': '1'
95
+ }
96
+
97
+ const killstreakTier = item => {
98
+ const ks = ['Professional Killstreak', 'Specialized Killstreak', 'Killstreak']
99
+ .find(s => item.market_hash_name.indexOf(s) !== -1)
100
+ return ks ? ksMap[ks] : undefined
101
+ }
102
+
103
+ function effect(item) {
104
+ if (item?.app_data?.quality !== '5') return null
105
+ const desc = (item.descriptions ?? []).find(d => d.color === 'ffd700')
106
+ if (!desc) return null
107
+ return particleEffectsInv[desc.value.replace('★ Unusual Effect: ', '')] ?? '-1'
108
+ }
109
+
110
+ const elevated = item =>
111
+ item?.app_data?.quality !== '11' &&
112
+ item.market_hash_name
113
+ .replace(items[item.app_data?.def_index]?.item_name ?? '', '')
114
+ .includes('Strange')
115
+
116
+ const uncraftable = item =>
117
+ Boolean((item.descriptions ?? []).find(d => d.value === '( Not Usable in Crafting )'))
118
+
119
+ const paintOptions = Object.keys(paintDefindex).map(name => `Paint Color: ${name}`)
120
+
121
+ const paintColor = item => {
122
+ const desc = (item.descriptions ?? []).find(d => paintOptions.includes(d.value))
123
+ if (!desc) return desc
124
+ return paintDefindex[desc.value.split('Paint Color: ')[1]]
125
+ }
126
+
127
+ const spellOptions = Object.keys(spellDefindex).map(name => `Halloween: ${name} (spell only active during event)`)
128
+
129
+ const halloweenSpell = item => {
130
+ const spells = (item.descriptions ?? [])
131
+ .filter(d => spellOptions.includes(d.value))
132
+ .map(d => spellDefindex[d.value.split('Halloween: ')[1].replace(' (spell only active during event)', '')])
133
+ return spells.length === 0 ? null : spells.join('_')
134
+ }
135
+
136
+ const rch = item => item?.app_data?.quality === '6' && !uncraftable(item) && rchSet.has(item?.app_data?.def_index) && item?.app_data?.def_index
137
+
138
+ const market_hash_name = item => item.market_hash_name
139
+
140
+ function setQuality(item) {
141
+ if (item?.app_data?.quality) return item
142
+ const qualityName = findTag('Quality', 'name', item)
143
+ const qualityId = qualityNamesInv[qualityName]
144
+ return { ...item, app_data: { ...(item.app_data ?? {}), quality: qualityId } }
145
+ }
146
+
147
+ const quality = item => item?.app_data?.quality ?? '-1'
148
+ const defindex = item => item?.app_data?.def_index ?? '-1'
223
149
 
224
150
  const propsTf2_1 = {
225
151
  defindex,
@@ -238,6 +164,7 @@ const propsTf2_1 = {
238
164
  recipe,
239
165
  halloweenSpell,
240
166
  paintColor,
167
+ rch,
241
168
  id,
242
169
  old_id,
243
170
  contextid,
@@ -245,74 +172,59 @@ const propsTf2_1 = {
245
172
  appid
246
173
  }
247
174
 
248
- const isTarget = either(
249
- compose(
250
- find(__, ['Strangifier', 'Fabricator', 'Strangifier Chemistry Set', 'Unusualifier']),
251
- flip(marketHashIncludes),
252
- ),
253
- allPass([
254
- marketHashIncludes('Kit'),
255
- marketHashIncludes('Killstreak')
175
+ const isTarget = item =>
176
+ ['Strangifier', 'Fabricator', 'Strangifier Chemistry Set', 'Unusualifier']
177
+ .find(s => item.market_hash_name.indexOf(s) !== -1) ||
178
+ (item.market_hash_name.indexOf('Kit') !== -1 && item.market_hash_name.indexOf('Killstreak') !== -1)
179
+
180
+ function target(item) {
181
+ if (!isTarget(item)) return null
182
+ const cleanName = removeStrings(item.market_hash_name, [
183
+ 'Strangifier',
184
+ 'Unusual',
185
+ 'Unusualifier',
186
+ items[item.defindex].item_name,
187
+ 'Specialized Killstreak',
188
+ 'Professional Killstreak',
189
+ 'Killstreak',
190
+ "Collector's",
191
+ 'Series',
192
+ 'Kit',
193
+ 'Fabricator',
194
+ 'Chemistry Set',
195
+ '#1',
196
+ '#2',
197
+ '#3'
256
198
  ])
257
- )
258
-
259
- const target = ifElse(
260
- isTarget,
261
- compose(
262
- propOr('-1', 'defindex'),
263
- find(__, values(items)),
264
- allPass,
265
- concat([propSatisfies(complement(includes)(__, [0, 15]), 'item_quality')]),
266
- Array.of,
267
- propEq(__, 'item_name'),
268
- ({ market_hash_name, defindex }) => removeStrings(market_hash_name, [
269
- 'Strangifier',
270
- 'Unusual',
271
- 'Unusualifier',
272
- items[defindex].item_name,
273
- 'Specialized Killstreak',
274
- 'Professional Killstreak',
275
- 'Killstreak',
276
- "Collector's",
277
- 'Series',
278
- 'Kit',
279
- 'Fabricator',
280
- 'Chemistry Set',
281
- '#1',
282
- '#2',
283
- '#3'
284
- ])
285
- ),
286
- always(null)
287
- )
199
+ return Object.values(items).find(
200
+ si => ![0, 15].includes(si.item_quality) && si.item_name === cleanName
201
+ )?.defindex ?? '-1'
202
+ }
288
203
 
289
204
  const output = ({ recipe, market_hash_name, killstreakTier }) => {
290
205
  switch (recipe) {
291
- case 'Fabricator':
206
+ case 'Fabricator': {
292
207
  const ktMap = {
293
208
  '2': '6523',
294
209
  '3': '6526'
295
210
  }
296
211
  return ktMap[killstreakTier]
212
+ }
297
213
  case 'Strangifier Chemistry Set':
298
214
  return '6522'
299
- case 'Chemistry Set':
300
- return compose(
301
- propOr('-1', 'defindex'),
302
- find(__, values(items)),
303
- allPass,
304
- concat([propSatisfies(complement(includes)(__, [0, 15]), 'item_quality')]),
305
- Array.of,
306
- propEq(__, 'item_name'),
307
- removeStrings(__, ['Chemistry Set', "Collector's"])
308
- )(market_hash_name)
215
+ case 'Chemistry Set': {
216
+ const cleanName = removeStrings(market_hash_name, ['Chemistry Set', "Collector's"])
217
+ return Object.values(items).find(
218
+ si => ![0, 15].includes(si.item_quality) && si.item_name === cleanName
219
+ )?.defindex ?? '-1'
220
+ }
309
221
  default:
310
222
  return null
311
223
  }
312
224
  }
313
225
 
314
226
  const oq = ({ market_hash_name, recipe }) => recipe
315
- ? includes("Collector's", market_hash_name) ? '14' : '6'
227
+ ? market_hash_name.includes("Collector's") ? '14' : '6'
316
228
  : null
317
229
 
318
230
  const propsTf2_2 = {
@@ -329,10 +241,10 @@ const propsOtherGame = {
329
241
  }
330
242
 
331
243
  const props753 = {
332
- market_hash_name: prop('market_hash_name'),
333
- border: compose(last, defaultTo(''), findTag('Card Border', 'internal_name')),
334
- game: compose(nth(1), split('_'), findTag('Game', 'internal_name')),
335
- type: ({ tags = [] }) => last(tags.find(tag => tag.category === 'item_class')?.internal_name || 'x'),
244
+ market_hash_name: item => item.market_hash_name,
245
+ border: item => (findTag('Card Border', 'internal_name', item) ?? '').at(-1),
246
+ game: item => findTag('Game', 'internal_name', item)?.split('_')[1],
247
+ type: ({ tags = [] }) => (tags.find(tag => tag.category === 'item_class')?.internal_name || 'x').at(-1),
336
248
  id,
337
249
  old_id,
338
250
  contextid,
@@ -340,88 +252,77 @@ const props753 = {
340
252
  appid
341
253
  }
342
254
 
343
- const keyRemap = when(
344
- compose(
345
- includes(__, ['5021', '5049', '5067', '5072', '5073', '5079', '5081', '5628', '5631', '5632', '5713', '5716', '5717', '5762', '5791', '5792']), //old keys that turned into regular keys
346
- String,
347
- prop('defindex')
348
- ),
349
- assoc('defindex', '5021')
350
- )
351
-
352
- const uncraftRemap = (uncraftRemapDefindex) => when(
353
- compose(
354
- includes(__, uncraftRemapDefindex),
355
- String,
356
- prop('defindex')
357
- ),
358
- assoc('uncraftable', false)
359
- )
360
-
361
- const kitRemap = when(
362
- compose(
363
- includes('Killstreakifier Basic'),
364
- propOr('', 'name'),
365
- prop(__, items),
366
- prop('defindex')
367
- ),
368
- assoc('defindex', '6527')
369
- )
255
+ const oldKeyDefindexes = ['5021', '5049', '5067', '5072', '5073', '5079', '5081', '5628', '5631', '5632', '5713', '5716', '5717', '5762', '5791', '5792']
256
+
257
+ const keyRemap = item => oldKeyDefindexes.includes(String(item.defindex))
258
+ ? { ...item, defindex: '5021' }
259
+ : item
260
+
261
+ const uncraftRemap = uncraftRemapDefindex => item =>
262
+ uncraftRemapDefindex.includes(String(item.defindex))
263
+ ? { ...item, uncraftable: false }
264
+ : item
265
+
266
+ export const kitRemap = item => (items[item.defindex]?.name ?? '').includes('Killstreakifier Basic')
267
+ ? { ...item, defindex: '6527' }
268
+ : item
370
269
 
371
270
  const otherIndex = {
372
- 5844: '5710', //fall acorns key
373
- 5845: '5720', //strongbox key
374
- 5846: '5740', //stockpile key
375
- 5847: '5827', //gargoyle key
376
- 5738: '5737', //stockpile crate
271
+ 5844: '5710', // fall acorns key
272
+ 5845: '5720', // strongbox key
273
+ 5846: '5740', // stockpile key
274
+ 5847: '5827', // gargoyle key
275
+ 5738: '5737', // stockpile crate
377
276
  }
378
277
 
379
- const otherRemap = when(
380
- compose(has(__, otherIndex), prop('defindex')),
381
- chain(assoc('defindex'), compose(prop(__, otherIndex), prop('defindex')))
382
- )
278
+ const otherRemap = item => item.defindex in otherIndex
279
+ ? { ...item, defindex: otherIndex[item.defindex] }
280
+ : item
383
281
 
384
282
  const defaultOptions440 = {
385
- omitProps: ['paintColor', 'halloweenSpell'],
283
+ omitProps: ['paintColor', 'halloweenSpell', 'rch'],
386
284
  uncraftRemapDefindex: ['5021']
387
285
  }
388
286
 
389
- const fromEconItem440 = ({ omitProps = [], uncraftRemapDefindex = [] } = defaultOptions440) => compose(
390
- pick(['sku', 'id', 'old_id', 'contextid', 'old_contextid', 'appid']),
391
- chain(assoc('sku'), skuFromItem),
392
- uncraftRemap(uncraftRemapDefindex),
393
- kitRemap,
394
- keyRemap,
395
- otherRemap,
396
- chain(mergeRight, compose(map(__, propsTf2_2), applyTo)),
397
- map(__, omit(omitProps, propsTf2_1)),
398
- unary(applyTo),
399
- setQuality
400
- )
401
-
402
- const fromEconItem753 = () => compose(
403
- pick(['sku', 'id', 'old_id', 'contextid', 'old_contextid', 'appid']),
404
- chain(assoc('sku'), skuFromItem753),
405
- map(__, props753),
406
- unary(applyTo)
407
- )
408
-
409
- const fromEconItemOther = (options = {}) => compose(
410
- map(__, propsOtherGame),
411
- unary(applyTo)
412
- )
287
+ function applyFns(fns, item) {
288
+ return Object.fromEntries(Object.entries(fns).map(([k, fn]) => [k, fn(item)]))
289
+ }
290
+
291
+ function fromEconItem440({ omitProps = [], uncraftRemapDefindex = [] } = defaultOptions440) {
292
+ return function (econItem) {
293
+ const item = setQuality(econItem)
294
+ const filteredProps = omitProps.length
295
+ ? Object.fromEntries(Object.entries(propsTf2_1).filter(([k]) => !omitProps.includes(k)))
296
+ : propsTf2_1
297
+ const mapped = applyFns(filteredProps, item)
298
+ const merged = { ...mapped, ...applyFns(propsTf2_2, mapped) }
299
+ const remapped = uncraftRemap(uncraftRemapDefindex)(kitRemap(keyRemap(otherRemap(merged))))
300
+ const withSku = { ...remapped, sku: skuFromItem(remapped) }
301
+ const { sku, id, old_id, contextid, old_contextid, appid } = withSku
302
+ return { sku, id, old_id, contextid, old_contextid, appid }
303
+ }
304
+ }
305
+
306
+ function fromEconItem753() {
307
+ return function (econItem) {
308
+ const mapped = applyFns(props753, econItem)
309
+ const withSku = { ...mapped, sku: skuFromItem753(mapped) }
310
+ const { sku, id, old_id, contextid, old_contextid, appid } = withSku
311
+ return { sku, id, old_id, contextid, old_contextid, appid }
312
+ }
313
+ }
314
+
315
+ function fromEconItemOther() {
316
+ return function (econItem) {
317
+ return applyFns(propsOtherGame, econItem)
318
+ }
319
+ }
413
320
 
414
321
  const mainFns = {
415
322
  440: fromEconItem440,
416
323
  753: fromEconItem753
417
324
  }
418
325
 
419
- const fromEconItem = (econItem) => (mainFns[econItem.appid] || fromEconItemOther)()(econItem)
420
-
421
- const fromEconItemOptions = curry((options, econItem) => (mainFns[econItem.appid] || fromEconItemOther)(options)(econItem))
326
+ export const fromEconItem = econItem => (mainFns[econItem.appid] || fromEconItemOther)()(econItem)
422
327
 
423
- module.exports = {
424
- fromEconItem,
425
- fromEconItemOptions,
426
- kitRemap
427
- }
328
+ export const fromEconItemOptions = options => econItem => (mainFns[econItem.appid] || fromEconItemOther)(options)(econItem)