UNPKG

@sudoo/marked

Version:

JavaScript & TypeScript code runner in JavaScript, safe with marked territory, asynchronous

30 lines (29 loc) 718 B
"use strict"; /** * @author WMXPY * @namespace Variable_SandLiteral * @description BigInt */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SandLiteralBigInt = void 0; class SandLiteralBigInt { static resolve(value) { if (value instanceof SandLiteralBigInt) { return value.toNativeBigInt(); } if (typeof value === "bigint") { return value; } return BigInt(value); } static create(value) { return new SandLiteralBigInt(value); } constructor(value) { this._value = value; } toNativeBigInt() { return BigInt(this._value); } } exports.SandLiteralBigInt = SandLiteralBigInt;