UNPKG

@taiga-ui/addon-commerce

Version:

Extension package for Taiga UI related to commerce, payment systems, currencies etc.

31 lines (27 loc) 1.26 kB
import * as i0 from '@angular/core'; import { Pipe } from '@angular/core'; import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants'; class TuiFormatCardPipe { transform(value = '', cardPrefilled = false) { return value && !cardPrefilled ? value .split('') .map((char, index) => index && index % 4 === 0 ? `${CHAR_NO_BREAK_SPACE}${char}` : char) .join('') : ''; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFormatCardPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); } static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiFormatCardPipe, isStandalone: true, name: "tuiFormatCard" }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFormatCardPipe, decorators: [{ type: Pipe, args: [{ standalone: true, name: 'tuiFormatCard', }] }] }); /** * Generated bundle index. Do not edit. */ export { TuiFormatCardPipe }; //# sourceMappingURL=taiga-ui-addon-commerce-pipes-format-card.mjs.map