@opra/common
Version:
Opra common package
29 lines (28 loc) • 765 B
JavaScript
import { __decorate, __metadata } from "tslib";
import { vg } from 'valgen';
import { DECODER, ENCODER } from '../../constants.js';
import { SimpleType } from '../simple-type.js';
let IbanType = class IbanType {
constructor(attributes) {
if (attributes)
Object.assign(this, attributes);
}
[DECODER]() {
return vg.isIBAN({ coerce: true });
}
[ENCODER]() {
return vg.isIBAN({ coerce: true });
}
};
IbanType = __decorate([
SimpleType({
name: 'iban',
description: 'An IBAN (International Bank Account Number)',
nameMappings: {
js: 'string',
json: 'string',
},
}),
__metadata("design:paramtypes", [Object])
], IbanType);
export { IbanType };