UNPKG

fracturedjsonjs

Version:

JSON formatter that produces highly readable but fairly compact output

27 lines (26 loc) 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenType = void 0; /** * Types of tokens that can be read from a stream of JSON text. Comments aren't part of the official JSON * standard, but we're supporting them anyway. BlankLine isn't typically a token by itself, but we want to * try to preserve those. */ var TokenType; (function (TokenType) { TokenType[TokenType["Invalid"] = 0] = "Invalid"; TokenType[TokenType["BeginArray"] = 1] = "BeginArray"; TokenType[TokenType["EndArray"] = 2] = "EndArray"; TokenType[TokenType["BeginObject"] = 3] = "BeginObject"; TokenType[TokenType["EndObject"] = 4] = "EndObject"; TokenType[TokenType["String"] = 5] = "String"; TokenType[TokenType["Number"] = 6] = "Number"; TokenType[TokenType["Null"] = 7] = "Null"; TokenType[TokenType["True"] = 8] = "True"; TokenType[TokenType["False"] = 9] = "False"; TokenType[TokenType["BlockComment"] = 10] = "BlockComment"; TokenType[TokenType["LineComment"] = 11] = "LineComment"; TokenType[TokenType["BlankLine"] = 12] = "BlankLine"; TokenType[TokenType["Comma"] = 13] = "Comma"; TokenType[TokenType["Colon"] = 14] = "Colon"; })(TokenType = exports.TokenType || (exports.TokenType = {}));