warframe-name-generator 2.0.0 → 2.0.1

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.
Files changed (2) hide show
  1. package/lib/data.js +32 -120
  2. package/package.json +3 -5
package/lib/data.js CHANGED
@@ -1,134 +1,46 @@
1
+ const load = async (path) => {
2
+ return (
3
+ await import(path, {
4
+ with: { type: 'json' },
5
+ })
6
+ ).default;
7
+ };
8
+
1
9
  export default {
2
10
  corpus: {
3
- adjectives: (
4
- await import('../options/corpus/adjectives.json', {
5
- assert: { type: 'json' },
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,
11
+ adjectives: await load('../options/corpus/adjectives.json'),
12
+ names: await load('../options/corpus/names.json'),
13
+ places: await load('../options/corpus/places.json'),
14
+ titles: await load('../options/corpus/titles.json'),
23
15
  },
24
16
  grineer: {
25
- adjectives: (
26
- await import('../options/grineer/adjectives.json', {
27
- assert: { type: 'json' },
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,
17
+ adjectives: await load('../options/grineer/adjectives.json'),
18
+ names: await load('../options/grineer/names.json'),
19
+ places: await load('../options/grineer/places.json'),
20
+ titles: await load('../options/grineer/titles.json'),
45
21
  },
46
22
  orokin: {
47
- adjectives: (
48
- await import('../options/orokin/adjectives.json', {
49
- assert: { type: 'json' },
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,
23
+ adjectives: await load('../options/orokin/adjectives.json'),
24
+ names: await load('../options/orokin/names.json'),
25
+ places: await load('../options/orokin/places.json'),
26
+ titles: await load('../options/orokin/titles.json'),
67
27
  },
68
28
  sentient: {
69
- adjectives: (
70
- await import('../options/sentient/adjectives.json', {
71
- assert: { type: 'json' },
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,
29
+ adjectives: await load('../options/sentient/adjectives.json'),
30
+ names: await load('../options/sentient/names.json'),
31
+ places: await load('../options/sentient/places.json'),
32
+ titles: await load('../options/sentient/titles.json'),
89
33
  },
90
34
  tenno: {
91
- adjectives: (
92
- await import('../options/tenno/adjectives.json', {
93
- assert: { type: 'json' },
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,
35
+ adjectives: await load('../options/tenno/adjectives.json'),
36
+ names: await load('../options/tenno/names.json'),
37
+ places: await load('../options/tenno/places.json'),
38
+ titles: await load('../options/tenno/titles.json'),
111
39
  },
112
40
  infested: {
113
- adjectives: (
114
- await import('../options/infested/adjectives.json', {
115
- assert: { type: 'json' },
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,
41
+ adjectives: await load('../options/infested/adjectives.json'),
42
+ names: await load('../options/infested/names.json'),
43
+ places: await load('../options/infested/places.json'),
44
+ titles: await load('../options/infested/titles.json'),
133
45
  },
134
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warframe-name-generator",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
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": "^9.1.0",
32
+ "c8": "^10.1.2",
34
33
  "chai": "^5.1.0",
35
- "coveralls": "^3.1.1",
36
34
  "mocha": "^10.3.0",
37
- "sinon": "^17.0.1"
35
+ "sinon": "^19.0.2"
38
36
  },
39
37
  "c8": {
40
38
  "reporter": [