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 827 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(t) { return new (t || SimpleTextFormatPipe)(); }; static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "formatText", type: SimpleTextFormatPipe, pure: true }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SimpleTextFormatPipe, [{ type: Pipe, args: [{ name: 'formatText' }] }], null, null); })(); //# sourceMappingURL=simpleTextFormat.js.map