@gaoding/gd-tracker
Version:
Gaoding tracker for sensorsdata(sa), baidu(_hmt), Growing.IO(gio)
62 lines (61 loc) • 1.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
FIELD_TYPE: function() {
return FIELD_TYPE;
},
Field: function() {
return Field;
},
Event: function() {
return Event;
},
Project: function() {
return Project;
}
});
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var FIELD_TYPE;
(function(FIELD_TYPE) {
FIELD_TYPE["NUMBER"] = "number";
FIELD_TYPE["LONG"] = "long";
FIELD_TYPE["INTEGER"] = "integer";
FIELD_TYPE["STRING"] = "string";
FIELD_TYPE["BOOLEAN"] = "boolean";
FIELD_TYPE["STRING_ARRAY"] = "array/string";
FIELD_TYPE["INTEGER_ARRAY"] = "array/integer";
})(FIELD_TYPE || (FIELD_TYPE = {}));
var Field = function Field(option) {
"use strict";
_classCallCheck(this, Field);
Object.assign(this, option);
};
var Event = function Event(option) {
"use strict";
_classCallCheck(this, Event);
this.d = [];
var list = Array.isArray(option === null || option === void 0 ? void 0 : option.d) ? option === null || option === void 0 ? void 0 : option.d : [];
var d = list.map(function(item) {
return new Field(item);
});
Object.assign(this, option, {
d: d
});
};
var Project = function Project(option) {
"use strict";
_classCallCheck(this, Project);
Object.assign(this, option);
};