@brimdata/zealot
Version:
The Javascript Client for Zed Lakes
38 lines (37 loc) • 937 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Uint32", {
enumerable: true,
get: ()=>Uint32
});
const _typeUint32 = require("../types/type-uint32");
const _isNull = require("../utils/is-null");
const _primitive = require("./primitive");
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
class Uint32 extends _primitive.Primitive {
toInt() {
if ((0, _isNull.isNull)(this.value)) return null;
return parseInt(this.value);
}
toJS() {
return this.toInt();
}
constructor(...args){
super(...args);
_defineProperty(this, "type", _typeUint32.TypeUint32);
}
}