Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

projectwallace/css-selector-complexity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

css-selector-complexity

Calculate the Cyclomatic Complexity of a CSS selector

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

Installation

npm install css-selector-complexity

Usage

const complexity = require('css-selector-complexity')
console.log(complexity('.my > #brutal ~ [css]:first-child + selector'))
//-> 5

Credits

The idea for this package originated from the following blog posts:

Related projects

About

Calculate the Cyclomatic Complexity of a CSS selector

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •