Meta Viewport Parser

JSON →
library 0.3.0 ·javascript
verified May 27, 2026

The `metaviewport-parser` library, currently at version 0.3.0, provides a robust parser and interpreter for the `content` attribute within HTML `<meta name="viewport">` declarations. It implements the algorithms specified in the W3C CSS Device Adaption specification, enabling developers to programmatically analyze and understand how viewport configurations affect rendering. The library offers `parseMetaViewPortContent` to break down the attribute string into valid, unknown, and invalid properties, and `getRenderingDataFromViewport` to interpret these properties against supplied browser dimensions to calculate initial width, height, zoom, and user-scalability. As a pre-1.0 package, its API should be considered experimental and may undergo changes. Its key differentiator is strict adherence to web standards for accurate viewport parsing, making it valuable for server-side rendering, testing tools, or dynamic content adaptation logic.

total hits 15
actors 8 distinct systems
last hit 23h ago Bingbot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany