@shakerquiz/utilities 4.0.18 → 4.0.20

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": "4.0.18",
4
+ "version": "4.0.20",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -1,9 +1,15 @@
1
- export const Mode = Object.freeze({
2
- 'Known': 'Known',
3
- 'Unknown': 'Unknown',
4
- })
1
+ export const Modes = Object.freeze(
2
+ /** @type {const} */ ([
3
+ 'Known',
4
+ 'Unknown',
5
+ ]),
6
+ )
5
7
 
6
- export const Modes = Object.freeze([
7
- 'Known',
8
- 'Unknown',
9
- ])
8
+ export const Mode = Object.freeze(
9
+ /** @type {{ [x in typeof Modes[number]]: x }} */ (
10
+ Modes.reduce(
11
+ (o, x) => (o[x] = x, o),
12
+ {},
13
+ )
14
+ ),
15
+ )
@@ -1,6 +1,7 @@
1
1
  export const Roles = Object.freeze(
2
2
  /** @type {const} */ ([
3
3
  'admin',
4
+ 'organizer',
4
5
  'captain',
5
6
  'player',
6
7
  'user',