import { Pipe , PipeTransform , NgModule } from '@angular/core' ; import { isString , isUndefined } from '../utils/utils' ; @ Pipe ( { name : 'wrap' , } ) export class WrapPipe implements PipeTransform { transform ( input , wrap , ends ? ) { return isString ( input ) && ! isUndefined ( wrap ) ? [ wrap , input , ends || wrap ] . join ( '' ) : input ; } } @ NgModule ( { declarations : [ WrapPipe ] , exports : [ WrapPipe ] , } ) export class NgWrapPipeModule { }