UNPKG

@dstanesc/o-o-o-o-o-o-o

Version:

O-O-O-O-O-O-O is a collection of content addressed persistent data structures

24 lines 960 B
// 1 byte var Status; (function (Status) { Status[Status["UNKNOWN"] = 0] = "UNKNOWN"; Status[Status["CREATED"] = 1] = "CREATED"; Status[Status["UPDATED"] = 4] = "UPDATED"; Status[Status["DELETED"] = 8] = "DELETED"; })(Status || (Status = {})); var ElemType; (function (ElemType) { ElemType[ElemType["VERTEX"] = 0] = "VERTEX"; ElemType[ElemType["EDGE"] = 1] = "EDGE"; ElemType[ElemType["PROP"] = 2] = "PROP"; })(ElemType || (ElemType = {})); // function isShortString<MaxBytes>(text: string, maxBytes: MaxBytes): text is ShortString<MaxBytes> { // return pack(text).byteLength <= maxBytes // } // function shortString<MaxBytes extends number>(text: unknown, max: MaxBytes): ShortString<MaxBytes> { // if (typeof text !== 'string') throw new Error("text not string") // if (!isShortString(text, max)) throw new Error("text too large") // return text // } export { ElemType, Status, }; //# sourceMappingURL=types.js.map