min-dom
A minimal dom utility toolbelt. Library friendly and based on utilities provided by component.
This library is tiny (2Kb
in size) and still exposes all fundamental utilities:
$ browserify index.js \
--standalone=dom \
--plugin=tinyify | \
gzip > min-dom.min.js.gz
$ du -b *.gz
1842 min-dom.min.js.gz
Features
The library exposes the following tiny dom helpers:
attr
- get and set node attributesclasses
- class name helperclear
- remove children from a nodeclosest
- get the closest parent by selector; component-closestdelegate
- event deletation support; delegate-eventsdomify
- html to elements; domifyevent
- event binding; component-eventmatches
- selector match check; matches-selectorquery
- native selector query supportremove
- detach a node from its parent
Related
- min-dash - minimal lodash inspired utility toolbelt
- tiny-svg - tiny SVG utility toolbelt
License
MIT