
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@emmetio/css-matcher
Advanced tools
The goal for this project is to quickly find edges of selector or property in CSS/LESS/SCSS source code:
import match from '@emmetio/css-matcher';
const content = '.foo { padding: 10px } .bar { margin: 20px }';
// Finds matched CSS selector at character position 2
const data = match(content, 2);
console.log(data.type); // Type of match: 'selector'
console.log(tag.start); // Location of match start: 0
console.log(tag.end); // Location of match end: 22
Matcher searches content
for a context match closest to given location
and, if found, returns object with the following properties:
type
: type of matched section, either selector
or property;start
: character location where match starts;end
: character location where match end, for selector
it will be right after }
, for property it will be right after ;
or property value;bodyStart
: location there body of the match starts. For selector
it will be right after {
, for property
it will be a beginning of the property value.bodyEnd
: location there body of the match ends. For selector
it will be right before }
, for property
it will be an end of the property value.FAQs
Small and fast CSS matcher
We found that @emmetio/css-matcher 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.