MCPcopy Create free account
hub / github.com/angular/angular / getOrSetDefaultValue

Function getOrSetDefaultValue

packages/animations/browser/src/render/shared.ts:141–147  ·  view source on GitHub ↗
(map: Map<T, V>, key: T, defaultValue: V)

Source from the content-addressed store, hash-verified

139}
140
141export function getOrSetDefaultValue<T, V>(map: Map<T, V>, key: T, defaultValue: V) {
142 let value = map.get(key);
143 if (!value) {
144 map.set(key, (value = defaultValue));
145 }
146 return value;
147}
148
149export function parseTimelineCommand(command: string): [string, string] {
150 const separatorPos = command.indexOf(':');

Callers 9

visitQueryMethod · 0.90
buildMethod · 0.90
listenMethod · 0.90
triggerMethod · 0.90
_flushAnimationsMethod · 0.90
_beforeAnimationBuildMethod · 0.90
_buildAnimationMethod · 0.90
_queueEventMethod · 0.90
createMethod · 0.90

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected