2.0.0 • Published 8 years ago

dom-stats v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

dom-stats Build Status js-standard-style

Parse and return stats for a given html string.

Installation

npm i -S dom-stats

Usage

const domStats = require('dom-stats')

const stats = domStats('<span id="foo"><i class="hi" id="foo"</i></span>')
console.log(stats)
// {
//   totalTags: 2,
//   totalClasses: 1,
//   totalIds: 2,
//   averageClassCount: 0.5,
//   duplicateIds: ['foo'],
//   duplicateIdsCount: 1,
//   tagCounts: { span: 1, a: 1 }
// }

License

MIT

Related

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with <3 by John Otander (@4lpine).


This package was initially generated with yeoman and the p generator.

2.0.0

8 years ago

1.0.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago