  We show that an $n-n^{-}-n$ junction in 2D semiconductors can flexibly
realize two basic valleytronic functions, i.e. valley filter and valley source,
with gate controlled switchability between the two. Upon carrier flux passing
through the junction, the valley filter and valley source functions are enabled
respectively by intra- and inter-valley scatterings, and the two functions
dominate respectively at small and large band-offset between the $n$ and
$n^{-}$ regions. It can be generally shown that, the valley filter effect has
an angular dependent polarity and vanishes under angular integration, by the
same constraint from time-reversal symmetry that leads to its absence in
one-dimension. These findings are demonstrated for monolayer transition metal
dichalcogenides and graphene using tight-binding calculations. We further show
that junction along chiral directions can concentrate the valley pump in an
angular interval largely separated from the bias direction, allowing efficient
havest of valley polarization in a cross-bar device.
