@opra/common
Version:
Opra common package
29 lines (28 loc) • 771 B
JavaScript
import { __decorate, __metadata } from "tslib";
import { vg } from 'valgen';
import { DECODER, ENCODER } from '../../constants.js';
import { SimpleType } from '../simple-type.js';
let Base64Type = class Base64Type {
constructor(attributes) {
if (attributes)
Object.assign(this, attributes);
}
[DECODER]() {
return vg.isBase64({ coerce: true });
}
[ENCODER]() {
return vg.isBase64({ coerce: true });
}
};
Base64Type = __decorate([
SimpleType({
name: 'base64',
description: 'A stream of bytes, base64 encoded',
nameMappings: {
js: 'string',
json: 'string',
},
}),
__metadata("design:paramtypes", [Object])
], Base64Type);
export { Base64Type };