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.
@ryanmorr/parselector
Advanced tools
Readme
Parse a CSS selector string
Download the CJS, ESM, UMD versions or install via NPM:
npm install @ryanmorr/parselector
Provide a selector string and get a two-dimensional array composed of each selector group in the first array and the tokens for a selector sequence in the second array.
import parselector from '@ryanmorr/parselector';
parselector('#foo[attr$="value" i] > div:not(.bar), .baz span::before');
Generates the following AST structure:
[
[
{
nodeName: null,
attributes: [
{
name: 'id',
operator: '=',
value: 'foo',
ignoreCase: false
},
{
name: 'attr',
operator: '$=',
value: 'value',
ignoreCase: true
}
],
pseudoClasses: [],
pseudoElement: null
},
'>',
{
nodeName: 'div',
attributes: [],
pseudoClasses: [
{
name: 'not',
value: '.bar'
}
],
pseudoElement: null
}
],
[
{
nodeName: null,
attributes: [
{
name: 'class',
operator: '~=',
value: 'baz',
ignoreCase: false
}
],
pseudoClasses: [],
pseudoElement: null
},
' ',
{
nodeName: 'span',
attributes: [],
pseudoClasses: [],
pseudoElement: 'before'
}
]
]
This project is dedicated to the public domain as described by the Unlicense.
FAQs
Parse a CSS selector string
The npm package @ryanmorr/parselector receives a total of 11 weekly downloads. As such, @ryanmorr/parselector popularity was classified as not popular.
We found that @ryanmorr/parselector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.