UNPKG

@memberjunction/ng-shared

Version:

MemberJunction: MJ Explorer Angular Shared Package - utility functions and other reusable elements used across other MJ Angular packages within the MJ Explorer App - do not use outside of MJ Explorer.

19 lines 897 B
import { Pipe } from '@angular/core'; import * as i0 from "@angular/core"; export class SimpleTextFormatPipe { transform(value) { if (!value) return value; // Replace \n with <br> and \t with non-breaking spaces return value .replace(/\n/g, '<br>') .replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;'); } static ɵfac = function SimpleTextFormatPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SimpleTextFormatPipe)(); }; static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "formatText", type: SimpleTextFormatPipe, pure: true, standalone: false }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SimpleTextFormatPipe, [{ type: Pipe, args: [{ standalone: false, name: 'formatText' }] }], null, null); })(); //# sourceMappingURL=simpleTextFormat.js.map