gw2e-static-data 0.5.49 → 0.5.50

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.
@@ -1,36 +0,0 @@
1
- const content = `copy & paste from excel into here`
2
-
3
- console.log('export default [')
4
- const rows = content.split('\n').slice(1)
5
- rows.map((row, i) => {
6
- row = row.split('\t')
7
- let comma = i === rows.length - 1 ? '' : ','
8
-
9
- let json = [
10
- `group: '${_string(row[1])}'`,
11
- `title: '${_string(row[3])}'`,
12
- `key: '${_string(row[4])}'`,
13
- `sprite: '${_string(row[5])}'`,
14
- `gold: ${_bool(row[6])}`,
15
- `by_playtime: ${_bool(row[7])}`,
16
- `decimals: ${_int(row[8])}`
17
- ].join(', ')
18
-
19
- // 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8
20
- // group sort - group - title sort - title - key - sprite - gold - by_playtime - decimals
21
-
22
- console.log(` {${json}}${comma}`)
23
- })
24
- console.log(']')
25
-
26
- function _string (string) {
27
- return string.replace(/'/g, `\\'`)
28
- }
29
-
30
- function _bool (x) {
31
- return x === 'TRUE'
32
- }
33
-
34
- function _int (x) {
35
- return parseInt(x, 10)
36
- }