UNPKG

asn1-ts

Version:

ASN.1 encoding and decoding, including BER, CER, and DER.

8 lines (7 loc) 225 B
import * as errors from "../../../errors.mjs"; export default function decodeBoolean(value) { if (value.length !== 1) { throw new errors.ASN1SizeError("BOOLEAN not one byte"); } return (value[0] !== 0); }