@shakerquiz/utilities 0.3.15 → 0.3.17

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakerquiz/utilities",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "author": "yurkimus <yurkimus@gmail.com>",
5
5
  "license": "ISC",
6
6
  "scripts": {
@@ -2,6 +2,7 @@ import * as cookies from '@yurkimus/cookies'
2
2
  import { MessageError } from '@yurkimus/errors'
3
3
  import * as message from '@yurkimus/message'
4
4
  import { ResponseStatus } from '@yurkimus/response-status'
5
+ import { type } from '@yurkimus/types'
5
6
  import { url } from '@yurkimus/url'
6
7
 
7
8
  import { Cookies } from '../enumerations/cookies.js'
@@ -45,21 +46,21 @@ var fulfillment = (kind, [response, body]) => {
45
46
  * @param {F | { feature: F, kind?: K, service?: S, network?: N }} configuration
46
47
  */
47
48
  export var getFeatureFetch = configuration => {
48
- var feature,
49
- kind = Kinds.Unit,
50
- service = FeatureServiceDefaults[feature],
51
- network = Networks.Public
49
+ var feature, kind, service, network
52
50
 
53
51
  switch (type(configuration)) {
54
52
  case 'String':
55
53
  feature = configuration
54
+ kind = Kinds.Unit
55
+ service = FeatureServiceDefaults[feature]
56
+ network = Networks.Public
56
57
  break
57
58
 
58
59
  case 'Object':
59
60
  feature = configuration.feature
60
- kind = configuration.kind ?? kind
61
- service = configuration.service ?? service
62
- network = configuration.network ?? network
61
+ kind = configuration.kind ?? Kinds.Unit
62
+ service = configuration.service ?? FeatureServiceDefaults[feature]
63
+ network = configuration.network ?? Networks.Public
63
64
  break
64
65
 
65
66
  default: