1.0.0 • Published 6 years ago

dom-safe v1.0.0

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
6 years ago

Safe-Dom

The set of functions for safe working with browser DOM

##How to install

    npm install safe-dom

##Usage

    import dom from '/node_modules/safe-dom/main.js'

clearChilds()

Safe remove all childs from DOM node with removing all listeners

###class(classObj) convert object fields to DOM class. The keys of objects becomes classes in DOM class string depends on theirs values. The keys with false values will be no added to resulting className

    const cstr = dom.class({ one: true, two: false, three: true });
    console.log(cstr); //'one three';
1.0.0

6 years ago