Skip to content

Commit

Permalink
move dateRange from constants to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
anandsahil committed Aug 1, 2019
1 parent 5ff3147 commit aa761cf
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
13 changes: 0 additions & 13 deletions lib/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
2 changes: 1 addition & 1 deletion lib/predefinedOrders/HAC.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const utils = require('../consts');
const utils = require('../utils');

module.exports = (start = null, end = null) => ({
version: 'h004',
Expand Down
2 changes: 1 addition & 1 deletion lib/predefinedOrders/PTK.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const utils = require('../consts');
const utils = require('../utils');

module.exports = (start = null, end = null) => ({
version: 'h004',
Expand Down
2 changes: 1 addition & 1 deletion lib/predefinedOrders/STA.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const utils = require('../consts');
const utils = require('../utils');

module.exports = (start = null, end = null) => ({
version: 'h004',
Expand Down
2 changes: 1 addition & 1 deletion lib/predefinedOrders/VMK.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const utils = require('../consts');
const utils = require('../utils');

module.exports = (start = null, end = null) => ({
version: 'h004',
Expand Down
2 changes: 1 addition & 1 deletion lib/predefinedOrders/Z53.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const utils = require('../consts');
const utils = require('../utils');

module.exports = (start = null, end = null) => ({
version: 'h004',
Expand Down
18 changes: 18 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

const dateRange = (start, end) => {
if (start && end)
return {
DateRange: {
Start: start,
End: end,
},
};

return {};
};


module.exports = {
dateRange,
};

0 comments on commit aa761cf

Please sign in to comment.