diff --git a/lib/consts.js b/lib/consts.js index ebd1219..293287c 100644 --- a/lib/consts.js +++ b/lib/consts.js @@ -10,22 +10,9 @@ const orderOperations = { download: 'DOWNLOAD', }; -const dateRange = (start, end) => { - if (start && end) - return { - DateRange: { - Start: start, - End: end, - }, - }; - - return {}; -}; - module.exports = { name, version, orderOperations, productString: `${name} ${version}`, - dateRange, }; diff --git a/lib/predefinedOrders/HAC.js b/lib/predefinedOrders/HAC.js index dcf86b5..82f8f58 100644 --- a/lib/predefinedOrders/HAC.js +++ b/lib/predefinedOrders/HAC.js @@ -1,6 +1,6 @@ 'use strict'; -const utils = require('../consts'); +const utils = require('../utils'); module.exports = (start = null, end = null) => ({ version: 'h004', diff --git a/lib/predefinedOrders/PTK.js b/lib/predefinedOrders/PTK.js index 38ad1c5..a0b7e77 100644 --- a/lib/predefinedOrders/PTK.js +++ b/lib/predefinedOrders/PTK.js @@ -1,6 +1,6 @@ 'use strict'; -const utils = require('../consts'); +const utils = require('../utils'); module.exports = (start = null, end = null) => ({ version: 'h004', diff --git a/lib/predefinedOrders/STA.js b/lib/predefinedOrders/STA.js index 039353a..4eb44e9 100644 --- a/lib/predefinedOrders/STA.js +++ b/lib/predefinedOrders/STA.js @@ -1,6 +1,6 @@ 'use strict'; -const utils = require('../consts'); +const utils = require('../utils'); module.exports = (start = null, end = null) => ({ version: 'h004', diff --git a/lib/predefinedOrders/VMK.js b/lib/predefinedOrders/VMK.js index e525e56..315af09 100644 --- a/lib/predefinedOrders/VMK.js +++ b/lib/predefinedOrders/VMK.js @@ -1,6 +1,6 @@ 'use strict'; -const utils = require('../consts'); +const utils = require('../utils'); module.exports = (start = null, end = null) => ({ version: 'h004', diff --git a/lib/predefinedOrders/Z53.js b/lib/predefinedOrders/Z53.js index 9d877d1..d196841 100644 --- a/lib/predefinedOrders/Z53.js +++ b/lib/predefinedOrders/Z53.js @@ -1,6 +1,6 @@ 'use strict'; -const utils = require('../consts'); +const utils = require('../utils'); module.exports = (start = null, end = null) => ({ version: 'h004', diff --git a/lib/utils.js b/lib/utils.js new file mode 100644 index 0000000..3390ead --- /dev/null +++ b/lib/utils.js @@ -0,0 +1,18 @@ +'use strict'; + +const dateRange = (start, end) => { + if (start && end) + return { + DateRange: { + Start: start, + End: end, + }, + }; + + return {}; +}; + + +module.exports = { + dateRange, +};