@angular-ru/cdk/pipes

  • MutableTypePipe

import {MutableTypePipe} from '@angular-ru/cdk/pipes';
import {Component} from '@angular/core';
import {Immutable} from '@angular-ru/typings';
import {Data} from './data';

@Component({
  //...
  imports: [MutableTypePipe],
  template: `
    <data [list]="data | mutable"></data>
  `,
})
export class AppComponent {
  public data: Immutable<Data[]> = [];
}
import {Immutable} from '@angular-ru/typings';
import {MutableTypePipe} from '@angular-ru/cdk/pipes';

const obj: Immutable<{a: string}> = {a: 'str'};
const mutableObj = new MutableTypePipe().transform(obj); // return { a: string }

mutableObj.a = 'str2';

expect(obj.a).toEqual('str2');
expect(mutableObj.a).toEqual('str2');
  • DeepPathPipe

  • DefaultValuePipe

  • IsNotNullPipe

  • IsNilPipe

  • IsObjectPipe

  • DetectBrowserPipe

  • IsStringPipe

  • IsArrayPipe

  • ToStringPipe

  • ToNumberPipe

  • FormatDatePipe

  • SafePipe

  • NumberFormatPipe

  • HttpReplacerPipe

  • TakeFirstItemPipe

  • TakeSecondItemPipe

  • DateToNativePipe

  • EntrySingleSetPipe

  • MarkByFilterPipe

  • DisplayItemPipe

  • ObjectSizePipe

  • MergeCssClassesPipe

  • JoinPipe

  • BracePipe

  • FilterUniquePipe

  • TypeAsPipe

  • AtPipe

  • HasItems, HasManyItems, HasNoItems, HasOneItem, HasAtMostOneItem

  • IncludesPipe

  • HasPipe

  • CoerceBooleanPipe

  • DeclinationOfNumberPipe

Last updated