From 94e3d3ab70402629fb5882523bc2506d9551dac0 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Wed, 27 Jan 2021 08:58:44 +0100 Subject: [PATCH] refactor(animations): remove unused utils function (#40588) The `mergeAnimationOptions` function is no longer used since 05472cb21be17d9f3ae526ea1a4d6ceb4cad5da7 PR Close #40588 --- .../src/dsl/animation_transition_factory.ts | 2 +- packages/animations/browser/src/util.ts | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/animations/browser/src/dsl/animation_transition_factory.ts b/packages/animations/browser/src/dsl/animation_transition_factory.ts index 8c2a8cb073..80c93757d5 100644 --- a/packages/animations/browser/src/dsl/animation_transition_factory.ts +++ b/packages/animations/browser/src/dsl/animation_transition_factory.ts @@ -9,7 +9,7 @@ import {AnimationOptions, ɵStyleData} from '@angular/animations'; import {AnimationDriver} from '../render/animation_driver'; 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 {buildAnimationTimelines} from './animation_timeline_builder'; diff --git a/packages/animations/browser/src/util.ts b/packages/animations/browser/src/util.ts index 2f9efc914d..24c51b1547 100644 --- a/packages/animations/browser/src/util.ts +++ b/packages/animations/browser/src/util.ts @@ -252,23 +252,6 @@ export function iteratorToArray(iterator: any): any[] { 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; export function dashCaseToCamelCase(input: string): string { return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());