Socket
Socket
Sign inDemoInstall

css-analyzer-diff

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    css-analyzer-diff

Calculate the difference between two sets of CSS stats


Version published
Weekly downloads
11
Maintainers
1
Install size
450 kB
Created
Weekly downloads
 

Readme

Source

css-analyzer-diff

NPM Version Build Status Known Vulnerabilities Dependencies Status Dependencies Status XO code style Project: Wallace

Calculate the difference between two sets of CSS stats.

Usage

const differ = require("css-analyzer-diff");
const analyzeCss = require("@projectwallace/css-analyzer");

const [firstStats, secondStats] = await Promise.all([
  analyzeCss(".cat { color: brown; }"),
  analyzeCss(".cat { color: red; }")
]);
const changes = differ(firstStats, secondStats);

//=> Returns an object with all changes
// {
//   'values.colors.unique': [
//     {
//       value: 'brown',
//       removed: true,
//       added: false,
//       changed: true
//     },
//     {
//       value: 'red',
//       removed: false,
//       added: true,
//       changed: true
//     }
//  ],
//
//  ... many more ...
//
// }

Keywords

FAQs

Last updated on 01 Sep 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc