warframe-name-generator 2.0.0 → 2.0.2
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/lib/data.js +33 -120
- package/package.json +3 -5
package/lib/data.js
CHANGED
|
@@ -1,134 +1,47 @@
|
|
|
1
|
+
const load = async (path) => {
|
|
2
|
+
return (
|
|
3
|
+
await import(path, {
|
|
4
|
+
with: { type: 'json' },
|
|
5
|
+
assert: { type: 'json' },
|
|
6
|
+
})
|
|
7
|
+
).default;
|
|
8
|
+
};
|
|
9
|
+
|
|
1
10
|
export default {
|
|
2
11
|
corpus: {
|
|
3
|
-
adjectives: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
).default,
|
|
8
|
-
names: (
|
|
9
|
-
await import('../options/corpus/names.json', {
|
|
10
|
-
assert: { type: 'json' },
|
|
11
|
-
})
|
|
12
|
-
).default,
|
|
13
|
-
places: (
|
|
14
|
-
await import('../options/corpus/places.json', {
|
|
15
|
-
assert: { type: 'json' },
|
|
16
|
-
})
|
|
17
|
-
).default,
|
|
18
|
-
titles: (
|
|
19
|
-
await import('../options/corpus/titles.json', {
|
|
20
|
-
assert: { type: 'json' },
|
|
21
|
-
})
|
|
22
|
-
).default,
|
|
12
|
+
adjectives: await load('../options/corpus/adjectives.json'),
|
|
13
|
+
names: await load('../options/corpus/names.json'),
|
|
14
|
+
places: await load('../options/corpus/places.json'),
|
|
15
|
+
titles: await load('../options/corpus/titles.json'),
|
|
23
16
|
},
|
|
24
17
|
grineer: {
|
|
25
|
-
adjectives: (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
).default,
|
|
30
|
-
names: (
|
|
31
|
-
await import('../options/grineer/names.json', {
|
|
32
|
-
assert: { type: 'json' },
|
|
33
|
-
})
|
|
34
|
-
).default,
|
|
35
|
-
places: (
|
|
36
|
-
await import('../options/grineer/places.json', {
|
|
37
|
-
assert: { type: 'json' },
|
|
38
|
-
})
|
|
39
|
-
).default,
|
|
40
|
-
titles: (
|
|
41
|
-
await import('../options/grineer/titles.json', {
|
|
42
|
-
assert: { type: 'json' },
|
|
43
|
-
})
|
|
44
|
-
).default,
|
|
18
|
+
adjectives: await load('../options/grineer/adjectives.json'),
|
|
19
|
+
names: await load('../options/grineer/names.json'),
|
|
20
|
+
places: await load('../options/grineer/places.json'),
|
|
21
|
+
titles: await load('../options/grineer/titles.json'),
|
|
45
22
|
},
|
|
46
23
|
orokin: {
|
|
47
|
-
adjectives: (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
).default,
|
|
52
|
-
names: (
|
|
53
|
-
await import('../options/orokin/names.json', {
|
|
54
|
-
assert: { type: 'json' },
|
|
55
|
-
})
|
|
56
|
-
).default,
|
|
57
|
-
places: (
|
|
58
|
-
await import('../options/orokin/places.json', {
|
|
59
|
-
assert: { type: 'json' },
|
|
60
|
-
})
|
|
61
|
-
).default,
|
|
62
|
-
titles: (
|
|
63
|
-
await import('../options/orokin/titles.json', {
|
|
64
|
-
assert: { type: 'json' },
|
|
65
|
-
})
|
|
66
|
-
).default,
|
|
24
|
+
adjectives: await load('../options/orokin/adjectives.json'),
|
|
25
|
+
names: await load('../options/orokin/names.json'),
|
|
26
|
+
places: await load('../options/orokin/places.json'),
|
|
27
|
+
titles: await load('../options/orokin/titles.json'),
|
|
67
28
|
},
|
|
68
29
|
sentient: {
|
|
69
|
-
adjectives: (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
).default,
|
|
74
|
-
names: (
|
|
75
|
-
await import('../options/sentient/names.json', {
|
|
76
|
-
assert: { type: 'json' },
|
|
77
|
-
})
|
|
78
|
-
).default,
|
|
79
|
-
places: (
|
|
80
|
-
await import('../options/sentient/places.json', {
|
|
81
|
-
assert: { type: 'json' },
|
|
82
|
-
})
|
|
83
|
-
).default,
|
|
84
|
-
titles: (
|
|
85
|
-
await import('../options/sentient/titles.json', {
|
|
86
|
-
assert: { type: 'json' },
|
|
87
|
-
})
|
|
88
|
-
).default,
|
|
30
|
+
adjectives: await load('../options/sentient/adjectives.json'),
|
|
31
|
+
names: await load('../options/sentient/names.json'),
|
|
32
|
+
places: await load('../options/sentient/places.json'),
|
|
33
|
+
titles: await load('../options/sentient/titles.json'),
|
|
89
34
|
},
|
|
90
35
|
tenno: {
|
|
91
|
-
adjectives: (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
).default,
|
|
96
|
-
names: (
|
|
97
|
-
await import('../options/tenno/names.json', {
|
|
98
|
-
assert: { type: 'json' },
|
|
99
|
-
})
|
|
100
|
-
).default,
|
|
101
|
-
places: (
|
|
102
|
-
await import('../options/tenno/places.json', {
|
|
103
|
-
assert: { type: 'json' },
|
|
104
|
-
})
|
|
105
|
-
).default,
|
|
106
|
-
titles: (
|
|
107
|
-
await import('../options/tenno/titles.json', {
|
|
108
|
-
assert: { type: 'json' },
|
|
109
|
-
})
|
|
110
|
-
).default,
|
|
36
|
+
adjectives: await load('../options/tenno/adjectives.json'),
|
|
37
|
+
names: await load('../options/tenno/names.json'),
|
|
38
|
+
places: await load('../options/tenno/places.json'),
|
|
39
|
+
titles: await load('../options/tenno/titles.json'),
|
|
111
40
|
},
|
|
112
41
|
infested: {
|
|
113
|
-
adjectives: (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
).default,
|
|
118
|
-
names: (
|
|
119
|
-
await import('../options/infested/names.json', {
|
|
120
|
-
assert: { type: 'json' },
|
|
121
|
-
})
|
|
122
|
-
).default,
|
|
123
|
-
places: (
|
|
124
|
-
await import('../options/infested/places.json', {
|
|
125
|
-
assert: { type: 'json' },
|
|
126
|
-
})
|
|
127
|
-
).default,
|
|
128
|
-
titles: (
|
|
129
|
-
await import('../options/infested/titles.json', {
|
|
130
|
-
assert: { type: 'json' },
|
|
131
|
-
})
|
|
132
|
-
).default,
|
|
42
|
+
adjectives: await load('../options/infested/adjectives.json'),
|
|
43
|
+
names: await load('../options/infested/names.json'),
|
|
44
|
+
places: await load('../options/infested/places.json'),
|
|
45
|
+
titles: await load('../options/infested/titles.json'),
|
|
133
46
|
},
|
|
134
47
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warframe-name-generator",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Name Generator for Warframe",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"test": "c8 mocha",
|
|
16
|
-
"coverage": "npm test && c8 report --reporter=text-lcov | coveralls",
|
|
17
16
|
"lint": "eslint .",
|
|
18
17
|
"lint:fix": "eslint . --fix",
|
|
19
18
|
"postinstall": "npx install-peerdeps @wfcd/eslint-config@latest -S"
|
|
@@ -30,11 +29,10 @@
|
|
|
30
29
|
"npm": ">=10.2.4"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
|
-
"c8": "^
|
|
32
|
+
"c8": "^10.1.2",
|
|
34
33
|
"chai": "^5.1.0",
|
|
35
|
-
"coveralls": "^3.1.1",
|
|
36
34
|
"mocha": "^10.3.0",
|
|
37
|
-
"sinon": "^
|
|
35
|
+
"sinon": "^19.0.2"
|
|
38
36
|
},
|
|
39
37
|
"c8": {
|
|
40
38
|
"reporter": [
|