UNPKG

cborkit

Version:

A modern, extensible CBOR (Concise Binary Object Representation) library for TypeScript and JavaScript.

2 lines (1 loc) 473 B
import{a as t}from"./chunk-2WDY66DD.js";var e=class e{constructor(n){t(this,"value");if(this.value=Number(n),!Number.isInteger(this.value))throw new Error("Simple value must be an integer");if(this.value<0||this.value>255)throw new Error("Simple value must be between 0 and 255")}static boolean(n){return n?e.true:e.false}static from(n){return new e(n)}};t(e,"false",new e(20)),t(e,"true",new e(21)),t(e,"null",new e(22)),t(e,"undefined",new e(23));var r=e;export{r as a};