UNPKG

@opra/common

Version:
32 lines (31 loc) 993 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Base64Type = void 0; const tslib_1 = require("tslib"); const valgen_1 = require("valgen"); const constants_js_1 = require("../../constants.js"); const simple_type_js_1 = require("../simple-type.js"); let Base64Type = class Base64Type { constructor(attributes) { if (attributes) Object.assign(this, attributes); } [constants_js_1.DECODER]() { return valgen_1.vg.isBase64({ coerce: true }); } [constants_js_1.ENCODER]() { return valgen_1.vg.isBase64({ coerce: true }); } }; exports.Base64Type = Base64Type; exports.Base64Type = Base64Type = tslib_1.__decorate([ (0, simple_type_js_1.SimpleType)({ name: 'base64', description: 'A stream of bytes, base64 encoded', nameMappings: { js: 'string', json: 'string', }, }), tslib_1.__metadata("design:paramtypes", [Object]) ], Base64Type);