UNPKG

antlr-ng

Version:

Next generation ANTLR Tool

27 lines (26 loc) 454 B
const parseBoolean = (value) => { if (value == null) { return true; } const lower = value.trim().toLowerCase(); return lower === "true" || lower === "1" || lower === "on" || lower === "yes"; }; const bufferEncodings = [ "ascii", "utf8", "utf-8", "utf16le", "utf-16le", "ucs2", "ucs-2", "base64", "base64url", "latin1", "binary", "hex" ]; const encodings = [...bufferEncodings]; export { encodings, parseBoolean };