Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Parses stylesheets and returns an object with statistics
Used in http://cssstats.com
npm install cssstats
var fs = require('fs');
var cssstats = require('csstats');
var css = fs.readFileSync('./styles.css', 'utf8');
var obj = cssstats(css);
size
The size of the file in bytes
gzipSize
The size of the stylesheet gzipped in bytes
selectors
An array of selectors sorted by source order with the selector string, specificity score, and parts array
declarations
An object of declarations.
declarations.all
An array of declaration objects from PostCSS.
declarations.byProperty
An object with keys for each property found in the stylesheet.
declarations.unique
An object with keys for each unique property/value found in the stylesheet.
declarations.byMedia
An object with keys for each media query found in the stylesheet.
rules
Flattened array of rules from PostCSS.
aggregates
Aggregate data for the entire stylesheet.
selectors
- total number of selectorsdeclarations
- total number of declarationsproperties
- an array of properties used in the stylesheetmediaQueries
- an array of media query strings used in the stylesheetFor every unique property found in the stylesheet, aggregates
also includes these values:
[property].total
- total number of [property] declarations[property].unique
- number of unique [property] declarationsSee the /test
folder for example JSON results.
FAQs
High-level stats for stylesheets
The npm package cssstats receives a total of 4,088 weekly downloads. As such, cssstats popularity was classified as popular.
We found that cssstats 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.