Open SteveVanOpstal opened 7 years ago
I agree with these aliases, but... is it allowed to use multiple names in the @Pipe
decorator?
Something in the form of the following should be possible (untested code):
import {Pipe, PipeTransform} from '@angular/core';
@Pipe({name: 'somePipe'})
export class SomePipe implements PipeTransform {
transform() {}
}
@Pipe({name: 'someOtherPipe'})
export class SomeOtherPipe implements PipeTransform {
somePipe = new SomePipe();
transform() {
return somePipe.transform();
}
}
In recent events the
SnakeCasePipe
is renamed toUnderscorePipe
(https://github.com/a8m/ng-pipes/commit/a103dd8b3bd15a64aaa0850b23cbb1a6d1afc944).In my opinion the name
SnakeCasePipe
makes a lot of sense. @rafaelss95 apparently thinksUnderscorePipe
to be more suitable.But looking at it from the user perspective both are equally correct names. I suggest we allow multiple names for the same pipes by creating aliases.
Alias suggestions
capitalize
--ucFirst
snakeCase
--underscore
camelCase
--camelize