Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 406 Bytes
// idea from
import {Pipe, PipeTransform} from '@angular/core';
import {isString, isUndefined} from '../utils/utils';
name: 'wrap'
export class WrapPipe implements PipeTransform {
transform(input: string, wrap: string, ends?: string): string {
return (isString(input) && !isUndefined(wrap)) ? [wrap, input, ends || wrap].join('') : input;
You can’t perform that action at this time.