@shakerquiz/utilities 0.3.4 → 0.3.5
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/package.json +1 -1
- package/source/functions/fetch.js +11 -11
package/package.json
CHANGED
|
@@ -74,52 +74,52 @@ export var useFetch = (service, feature, network) =>
|
|
|
74
74
|
function fetcher(options, init) {
|
|
75
75
|
if (!(service in Services))
|
|
76
76
|
throw TypeError(
|
|
77
|
-
`
|
|
77
|
+
`Service '${service}' is not listed in 'Services'.`,
|
|
78
78
|
)
|
|
79
79
|
|
|
80
80
|
if (!(feature in Features))
|
|
81
81
|
throw TypeError(
|
|
82
|
-
`Feature '${feature}'
|
|
82
|
+
`Feature '${feature}' is not listed in 'Features'.`,
|
|
83
83
|
)
|
|
84
84
|
|
|
85
85
|
if (!(feature in FeaturePathnames))
|
|
86
86
|
throw TypeError(
|
|
87
|
-
`Feature '${feature}'
|
|
87
|
+
`Feature '${feature}' is not listed in 'FeaturePathnames'.`,
|
|
88
88
|
)
|
|
89
89
|
|
|
90
|
-
if (!
|
|
90
|
+
if (!ServiceFeatures[service].includes(feature))
|
|
91
91
|
throw TypeError(
|
|
92
|
-
`Feature '${feature}'
|
|
92
|
+
`Feature '${feature}' is not listed in 'ServiceFeatures[${service}]'.`,
|
|
93
93
|
)
|
|
94
94
|
|
|
95
95
|
if (!(init.method in RequestMethods))
|
|
96
96
|
throw TypeError(
|
|
97
|
-
`Method '${init.method}'
|
|
97
|
+
`Method '${init.method}' is not listed in 'RequestMethods'.`,
|
|
98
98
|
)
|
|
99
99
|
|
|
100
100
|
if (!(network in Networks))
|
|
101
101
|
throw TypeError(
|
|
102
|
-
`Network '${network}'
|
|
102
|
+
`Network '${network}' is not listed in 'Networks'.`,
|
|
103
103
|
)
|
|
104
104
|
|
|
105
105
|
if (!ServiceFeatureNetworkURLs.has(service))
|
|
106
106
|
throw TypeError(
|
|
107
|
-
`Service '${service}'
|
|
107
|
+
`Service '${service}' is not listed in 'ServiceFeatureNetworkURLs'.`,
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
if (!ServiceFeatureNetworkURLs.get(service).has(feature))
|
|
111
111
|
throw TypeError(
|
|
112
|
-
`Feature '${feature}'
|
|
112
|
+
`Feature '${feature}' is not listed in 'ServiceFeatureNetworkURLs[${service}]'.`,
|
|
113
113
|
)
|
|
114
114
|
|
|
115
115
|
if (!ServiceFeatureNetworkURLs.get(service).get(feature).has(network))
|
|
116
116
|
throw TypeError(
|
|
117
|
-
`Network '${network}'
|
|
117
|
+
`Network '${network}' is not listed in 'ServiceFeatureNetworkURLs[${service}][${feature}]'.`,
|
|
118
118
|
)
|
|
119
119
|
|
|
120
120
|
if (!ServiceFeatureNetworkURLs.get(service).get(feature).get(network))
|
|
121
121
|
throw TypeError(
|
|
122
|
-
`Network '${network}' of 'ServiceFeatureNetworkURLs[${service}][${feature}]'
|
|
122
|
+
`Network '${network}' of 'ServiceFeatureNetworkURLs[${service}][${feature}]' has no value.`,
|
|
123
123
|
)
|
|
124
124
|
|
|
125
125
|
extensions.set(
|