@ham2k/lib-operation-data 0.5.0 → 0.6.0

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/package.json +1 -1
  2. package/src/lib/modes.js +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ham2k/lib-operation-data",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/lib/modes.js CHANGED
@@ -132,3 +132,15 @@ export function adifModeAndSubmodeForMode(mode) {
132
132
  return [mode]
133
133
  }
134
134
  }
135
+
136
+ export function superModeForMode(mode) {
137
+ if (ADIF_MODE_FOR_SUBMODE[mode]) mode = ADIF_MODE_FOR_SUBMODE[mode]
138
+
139
+ if (mode === 'CW') {
140
+ return 'CW'
141
+ } else if (mode === 'SSB' || mode === 'FM' || mode === 'AM' || mode === 'DIGITALVOICE') {
142
+ return 'PHONE'
143
+ } else {
144
+ return 'DATA'
145
+ }
146
+ }