Add JS logic for filter

This commit is contained in:
Tom Raithel
2017-02-12 22:35:40 +01:00
parent d96380a57f
commit b2a37fd698
5 changed files with 103 additions and 36 deletions

View File

@@ -1,3 +1,8 @@
const add = (x, y) => x + y;
import filter from './filter';
add(1, 4);
const enhanceComponent = (selector, enhancer) => {
const $filter = [].slice.call(document.querySelectorAll(selector));
$filter.map(enhancer);
}
enhanceComponent('.js--filter', filter);