refactor: simplify arrow functions (#12057)
This commit is contained in:

committed by
Chuck Jazdzewski

parent
a63359689f
commit
50c37d45dc
@ -52,6 +52,6 @@ export class By {
|
||||
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
||||
*/
|
||||
static directive(type: Type<any>): Predicate<DebugElement> {
|
||||
return (debugElement) => { return debugElement.providerTokens.indexOf(type) !== -1; };
|
||||
return (debugElement) => debugElement.providerTokens.indexOf(type) !== -1;
|
||||
}
|
||||
}
|
||||
|
@ -14,10 +14,10 @@ var DASH_CASE_REGEXP = /-([a-z])/g;
|
||||
|
||||
export function camelCaseToDashCase(input: string): string {
|
||||
return StringWrapper.replaceAllMapped(
|
||||
input, CAMEL_CASE_REGEXP, (m: any /** TODO #9100 */) => { return '-' + m[1].toLowerCase(); });
|
||||
input, CAMEL_CASE_REGEXP, (m: string[]) => '-' + m[1].toLowerCase());
|
||||
}
|
||||
|
||||
export function dashCaseToCamelCase(input: string): string {
|
||||
return StringWrapper.replaceAllMapped(
|
||||
input, DASH_CASE_REGEXP, (m: any /** TODO #9100 */) => { return m[1].toUpperCase(); });
|
||||
input, DASH_CASE_REGEXP, (m: string[]) => m[1].toUpperCase());
|
||||
}
|
||||
|
Reference in New Issue
Block a user