fix(flatten): fix flattenFilter, add shallow option
fix(filter): register flatten module