🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

cssstats

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssstats - npm Package Compare versions

Comparing version

to
3.5.0

test/keyframes-test.js

12

index.js

@@ -6,2 +6,3 @@ var _ = require('lodash')

var gzipSize = require('gzip-size')
var size = require('./lib/size')

@@ -13,3 +14,3 @@ var rules = require('./lib/rules')

module.exports = function(src, opts) {
module.exports = function (src, opts) {
opts = opts || {}

@@ -24,3 +25,3 @@ opts = _.defaults(opts, {

propertyResets: false,
vendorPrefixedProperties: false
vendorPrefixedProperties: false,
})

@@ -47,7 +48,7 @@

plugin: 'postcss-cssstats',
stats: stats
stats: stats,
})
}
stats.toJSON = function() {
stats.toJSON = function () {
// Remove methods when using JSON.stringify

@@ -72,3 +73,4 @@ delete stats.selectors.getSpecificityGraph

// Default behavior
var root = postcss().process(src, { parser: safeParser }).root
var root = postcss([]).process(src, { parser: safeParser, from: undefined })
.root
var result = parse(root, {})

@@ -75,0 +77,0 @@ return result

{
"name": "cssstats",
"version": "3.4.1",
"version": "3.5.0",
"description": "High-level stats for stylesheets",

@@ -8,3 +8,3 @@ "main": "index.js",

"license": "MIT",
"repository": "cssstats/cssstats-core",
"repository": "cssstats/cssstats",
"keywords": [

@@ -17,28 +17,21 @@ "CSS",

"dependencies": {
"bytes": "^3.0.0",
"css-selector-tokenizer": "^0.7.0",
"css-shorthand-expand": "^1.1.0",
"gzip-size": "^4.1.0",
"has-class-selector": "^3.3.1",
"has-element-selector": "^3.3.1",
"has-id-selector": "^3.3.1",
"has-pseudo-class": "^3.3.1",
"has-pseudo-element": "^3.3.1",
"bytes": "^3.1.0",
"css-selector-tokenizer": "^0.7.3",
"css-shorthand-expand": "^1.2.0",
"gzip-size": "^5.1.1",
"has-class-selector": "^3.5.0",
"has-element-selector": "^3.5.0",
"has-id-selector": "^3.5.0",
"has-pseudo-class": "^3.5.0",
"has-pseudo-element": "^3.5.0",
"is-blank": "^2.1.0",
"is-css-shorthand": "^1.0.1",
"is-present": "^1.0.0",
"is-vendor-prefixed": "^3.3.1",
"lodash": "^4.17.5",
"postcss": "^6.0.21",
"postcss-safe-parser": "^3.0.1",
"specificity": "^0.3.2"
"is-vendor-prefixed": "^3.5.0",
"lodash": "^4.17.20",
"postcss": "^8.1.4",
"postcss-safe-parser": "^5.0.2",
"specificity": "^0.4.1"
},
"devDependencies": {
"get-css": "^3.4.1",
"mocha": "^5.0.5"
},
"scripts": {
"test": "rm -rf test/results && mkdir test/results && mocha test"
},
"gitHead": "24602286cb10123ec6286404c89af5105763733d"
"gitHead": "dddf9c82cec12c909947f89d551fa86a74e90dba"
}

@@ -1,2 +0,2 @@

# cssstats [![Build Status](https://travis-ci.org/cssstats/core.svg?branch=master)](https://travis-ci.org/cssstats/core)
# cssstats

@@ -38,4 +38,4 @@ Parses stylesheets and returns an object with statistics.

.process(css)
.then(function(result) {
result.messages.forEach(function(message) {
.then(function (result) {
result.messages.forEach(function (message) {
console.log(message)

@@ -42,0 +42,0 @@ })

@@ -78,3 +78,3 @@ {

"selectors": {
"total": 13,
"total": 11,
"type": 1,

@@ -95,4 +95,2 @@ "class": 9,

".box:last-child",
"0%",
"100%",
"header",

@@ -103,3 +101,3 @@ ".georgia"

"max": 100,
"average": 18
"average": 21.09090909090909
}

@@ -106,0 +104,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display