1.0.0 • Published 6 years ago

ngx-mix v1.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

NgxMixLibraries

Use Cases

Pipes

apply & applyPure pipes

applyPure Pipe Transforms the input that changes only by reference value by applying given pure function

@Component({
  selector: 'app-apply-pipe',
  template: '<span>SUM of {{fib | json}} =  {{fib | applyPure: sum}}</span>'
})
export class ApplyPipeComponent {

 fib = [1, 2, 3, 5, 8, 13];
 constructor() { }
 
  public sum(collection: [number]): number {
    return collection.reduce((first, second) => first + second);
  }

}

apply Pipe Transforms the input value by applying given function

#NgzMixLibraries

Build, Deploy, Test and Try out

https://github.com/simars/ngx-mix-libraries/blob/master/README.md