declass
> Statically analyze HTML to detect potential class groupings
Last updated 5 years ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install declass 
SYNC missed versions from official npm registry.

declass

Statically analyze HTML to detect potential class groupings

npm version npm downloads Github Actions Codecov

Install

Install using npm or yarn:

npm i declass
# or
yarn add declass

Import into your Node.js project:

// CommonJS
const { declass } = require('declass')

// ESM
import { declass } from 'declass'

Usage

declass(html)
[
  "class": "duration-200 group-hover:opacity-100 transition-opacity",
  "uses": [
    "<div class="transition-opacity duration-200 ease-in-out opacity-0 group-hover:opacity-100 absolute top-4 right-6 cursor-pointer" data-v-cc3a34da="">",
    "<img src=\\"https://avatars3.githubusercontent.com/u/2781561?v=4&s=24\\" alt=\\"Troy Morehouse\\" width=\\"24\\" height=\\"24\\" class=\\"relative inline-block rounded-full text-white shadow-solid transition-opacity duration-200 opacity-75 group-hover:opacity-100\\" data-v-cc3a34da=\\"\\">",
    ...
  ],
  ...
]

(see test snapshot)

License

MIT. Made with ????

Current Tags

  • 0.0.1                                ...           latest (5 years ago)

1 Versions

  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (11)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |