File

src/app/core/pipes/humanize.pipe.ts

Metadata

name humanize

Methods

transform
transform(value: )
Parameters :
Name Optional
value no
Returns : any
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({ name: 'humanize' })

export class HumanizePipe implements PipeTransform {

  /**
   *
   *
   * @param {any} value
   * @returns
   *
   * @memberof HumanizePipe
   */
  transform(value) {
    let updated_val = value;
    if (typeof (value) === 'string') {
      updated_val = value.replace(/\_/g, ' ');
    }
    return updated_val;
  }

};

results matching ""

    No results matching ""