refactor(animations): remove unused utils function (#40588)
The `mergeAnimationOptions` function is no longer used since 05472cb21b
PR Close #40588
This commit is contained in:
parent
34aa9c3531
commit
94e3d3ab70
|
@ -9,7 +9,7 @@ import {AnimationOptions, ɵStyleData} from '@angular/animations';
|
||||||
|
|
||||||
import {AnimationDriver} from '../render/animation_driver';
|
import {AnimationDriver} from '../render/animation_driver';
|
||||||
import {getOrSetAsInMap} from '../render/shared';
|
import {getOrSetAsInMap} from '../render/shared';
|
||||||
import {copyObj, interpolateParams, iteratorToArray, mergeAnimationOptions} from '../util';
|
import {copyObj, interpolateParams, iteratorToArray} from '../util';
|
||||||
|
|
||||||
import {StyleAst, TransitionAst} from './animation_ast';
|
import {StyleAst, TransitionAst} from './animation_ast';
|
||||||
import {buildAnimationTimelines} from './animation_timeline_builder';
|
import {buildAnimationTimelines} from './animation_timeline_builder';
|
||||||
|
|
|
@ -252,23 +252,6 @@ export function iteratorToArray(iterator: any): any[] {
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function mergeAnimationOptions(
|
|
||||||
source: AnimationOptions, destination: AnimationOptions): AnimationOptions {
|
|
||||||
if (source.params) {
|
|
||||||
const p0 = source.params;
|
|
||||||
if (!destination.params) {
|
|
||||||
destination.params = {};
|
|
||||||
}
|
|
||||||
const p1 = destination.params;
|
|
||||||
Object.keys(p0).forEach(param => {
|
|
||||||
if (!p1.hasOwnProperty(param)) {
|
|
||||||
p1[param] = p0[param];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return destination;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
||||||
export function dashCaseToCamelCase(input: string): string {
|
export function dashCaseToCamelCase(input: string): string {
|
||||||
return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());
|
return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());
|
||||||
|
|
Loading…
Reference in New Issue