MCPcopy Create free account
hub / github.com/angular/components / coerceCssPixelValue

Function coerceCssPixelValue

src/google-maps/google-map/google-map.ts:548–554  ·  view source on GitHub ↗

Coerces a value to a CSS pixel value.

(value: any)

Source from the content-addressed store, hash-verified

546
547/** Coerces a value to a CSS pixel value. */
548function coerceCssPixelValue(value: any): string {
549 if (value == null) {
550 return '';
551 }
552
553 return cssUnitsPattern.test(value) ? value : `${value}px`;
554}

Callers 1

_setSizeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected