feat(before): add before filter
fix(filter.js): fix typo
feat(before): add before filter
test(before): before fully tested