Server-side MatchMedia Mock
JSON →match-media-mock provides a server-side compatible substitution for the browser's `Window.matchMedia()` API. It allows developers to simulate media queries in non-browser environments, such as Node.js, making it useful for server-side rendering (SSR) of applications that rely on responsive styles or conditional rendering based on media features. The package, currently at version 0.1.1, appears to be unmaintained with its last significant update approximately 8 years ago. Its core functionality is built upon the `css-mediaquery` library for parsing and evaluating media query strings. It was specifically designed for integration with styling libraries like Radium to enable isomorphic React applications to correctly apply styles based on simulated viewport dimensions during server rendering. Due to its age, it lacks modern features and might not be compatible with contemporary module systems (ESM) or testing frameworks without additional shims, and more active alternatives now exist.
Traffic · last 30 days ↑100% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany