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

Method isMatched

src/cdk/layout/breakpoints-observer.ts:63–66  ·  view source on GitHub ↗

* Whether one or more media queries match the current viewport size. * @param value One or more media queries to check. * @returns Whether any of the media queries match.

(value: string | readonly string[])

Source from the content-addressed store, hash-verified

61 * @returns Whether any of the media queries match.
62 */
63 isMatched(value: string | readonly string[]): boolean {
64 const queries = splitQueries(coerceArray(value));
65 return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);
66 }
67
68 /**
69 * Gets an observable of results for the given queries that will emit new results for any changes

Callers 2

constructorMethod · 0.80

Calls 3

_registerQueryMethod · 0.95
coerceArrayFunction · 0.90
splitQueriesFunction · 0.85

Tested by

no test coverage detected