'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var checkIfDateParam = function checkIfDateParam(tag) {
return tag === 'beginTime' || tag === 'endTime';
};
var getEpoch = function getEpoch(time) {
if (typeof time === 'string') {
return new Date(0).setUTCMilliseconds(new Date(time));
}
if ((typeof time === 'undefined' ? 'undefined' : _typeof(time)) === 'object') {
return new Date(0).setUTCMilliseconds(time);
}
if (typeof time === 'number') {
return time;
}
return 0;
};
exports.default = {
checkIfDateParam: checkIfDateParam,
getEpoch: getEpoch
}; |