A basic javascript paginator, for use with Node.js