Function `to` has 64 lines of code (exceeds 25 allowed). Consider refactoring. https://codeclimate.com/github/Goldinteractive/js-base/src/utils/dom.js#issue_5c779baab209070001000038