Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
css-mq-parser
Advanced tools
Readme
Parses CSS media query expressions.
Install via npm:
$ npm install css-mq-parser
This package exports one function, which can parse CSS media query expressions and return an AST.
The parser tolerates several known CSS media query browser hacks, but will throw a SyntaxError
if the media query expression is severely malformed.
Note that this module implements a lax/liberal/non-validating parser; even modulo browser hacks, the fact that it parses a given expression successfully does not guarantee that the expression is valid per the relevant CSS specifications.
var parseMediaQuery = require('css-mq-parser');
var ast = parseMediaQuery('screen and (min-width: 48em)');
The ast
variable will have the following payload:
[
{
"inverse": false,
"preTypeHack": "",
"type": "screen",
"postTypeHack": "",
"expressions": [
{
"modifier": "min",
"feature": "width",
"value": "48em"
}
]
}
]
This project is a fork of css-mediaquery. This software is free to use under the New/Revised BSD License. See the LICENSE file for license text and copyright information.
FAQs
Parses CSS media queries
The npm package css-mq-parser receives a total of 1,829 weekly downloads. As such, css-mq-parser popularity was classified as popular.
We found that css-mq-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.