JavaScript implementation of Portafilter