Functional and immutable dom transformer for node and the browser