Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

symdiff

Build Status Coverage Status

Calculates symmetric difference between two arrays of strings. Main purpose is to detect unused CSS classes.

API

symdiff takes three arrays of strings as arguments:

  1. the classes used in CSS
  2. the classes used in templates
  3. classes to ignore

It outputs an object with the fields css and templates. For instance:

var css = ["grid", "grid-col", "grid-row"],
    html= ["grid"                        ],
    ignr= [        "grid-col"            ];

symdiff(css, html, ignr)
> { css: ["grid-row"], templates: [] }

License

Apache 2

About

Calculates symmetric difference between CSS and template classes.

Resources

License

Packages

No packages published