UNPKG

@brimdata/zealot

Version:

The Javascript Client for Zed Lakes

38 lines (37 loc) 930 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Uint8", { enumerable: true, get: ()=>Uint8 }); const _typeUint8 = require("../types/type-uint8"); 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 Uint8 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", _typeUint8.TypeUint8); } }