@ham2k/lib-cqmag-data 0.0.16 → 0.1.1

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/src/index.js CHANGED
@@ -1,9 +1,8 @@
1
- const CQZONES = require('../data/cqzones.json')
2
- const CQZONES_FOR_STATES = require('../data/cqz-for-states.json')
3
- const CQWW_ENTITIES = require("./data/cqwwByPrefix.json")
1
+ import cqZones from '../data/cqzones.json' assert { type: 'json' }
2
+ import stateZones from '../data/cqz-for-states.json' assert { type: 'json' }
3
+ import cqww from './data/cqwwByPrefix.json' assert { type: 'json' }
4
+
5
+ export const CQZONES = cqZones
6
+ export const CQZONES_FOR_STATES = stateZones
7
+ export const CQWW_ENTITIES = cqww
4
8
 
5
- module.exports = {
6
- CQZONES,
7
- CQZONES_FOR_STATES,
8
- CQWW_ENTITIES
9
- }
@@ -1,9 +1,9 @@
1
1
  // const { parse } = require("csv/dist/cjs/sync.cjs") // Use this line when running tests
2
2
 
3
- const { CTYData } = require('@ham2k/lib-country-files/builtinData')
4
- const WAE = require('../../data/wae.json')
3
+ import { CTYData } from '@ham2k/lib-country-files/builtinData'
4
+ import WAE from '../../data/wae.json' assert { type: 'json' }
5
5
 
6
- function preprocessCQWWData (dxcc) {
6
+ export function preprocessCQWWData (dxcc) {
7
7
  const cqww = {}
8
8
 
9
9
  Object.keys(dxcc).forEach((code) => {
@@ -28,6 +28,3 @@ function preprocessCQWWData (dxcc) {
28
28
  return cqww
29
29
  }
30
30
 
31
- module.exports = {
32
- preprocessCQWWData
33
- }
@@ -1,5 +1,5 @@
1
- const { preprocessCQWWData } = require('./preprocessing')
2
- const { ENTITIES } = require('@ham2k/lib-dxcc-data')
1
+ import { preprocessCQWWData } from './preprocessing'
2
+ import { ENTITIES } from '@ham2k/lib-dxcc-data'
3
3
 
4
4
  /* eslint dot-notation: 0 */
5
5