@shakerquiz/utilities 0.5.100 → 0.5.101

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "0.5.100",
4
+ "version": "0.5.101",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -0,0 +1,25 @@
1
+ export var VenueCityMode = /** @type {const} */ ({
2
+ 'known': 'known',
3
+ 'unknown': 'unknown',
4
+ })
5
+
6
+ /**
7
+ * @returns {keyof typeof VenueCityMode}
8
+ */
9
+ var get = value =>
10
+ value in VenueCityMode
11
+ ? value
12
+ : VenueCityMode['unknown']
13
+
14
+ export var getVenueCityMode = value => {
15
+ switch (typeof value) {
16
+ case 'string':
17
+ return get(value)
18
+
19
+ case 'object':
20
+ return get(value?.mode)
21
+
22
+ default:
23
+ return get(undefined)
24
+ }
25
+ }
@@ -24,6 +24,9 @@ export var VenueStatusIcon = {
24
24
  [VenueStatus['UNKNOWN']]: 'hero/outline/no-symbol',
25
25
  }
26
26
 
27
+ /**
28
+ * @returns {keyof typeof VenueStatus}
29
+ */
27
30
  var get = value =>
28
31
  value in VenueStatus
29
32
  ? value
package/source/index.js CHANGED
@@ -21,6 +21,7 @@ export * from './enumerations/entities/registration-mailing.js'
21
21
  export * from './enumerations/entities/registration-status.js'
22
22
  export * from './enumerations/entities/role-mode.js'
23
23
  export * from './enumerations/entities/role.js'
24
+ export * from './enumerations/entities/venue-city-mode.js'
24
25
  export * from './enumerations/entities/venue-status.js'
25
26
  export * from './enumerations/entities/venues-mode.js'
26
27
  export * from './enumerations/entities/version.js'