published my first NPM module: sails-hook-pagify
Link: https://github.com/colintoh/sails-hook-pagify
For the past few production nodejs app, my team realised that there was a common feature needed from the server by the mobile clients: Infinite list loading.
For that to work, the required API's needs to be paginated. For example, `GET /users?page=1`, `GET /users?page=2`, ... etc.
In Sails JS, there is `paginate` method but it lacks metadata like total number of pages, presence of next/prev page .. etc.
Hence, sails-hook-pagify was refactored out from the completed projects and into a installable hook that we can re-use for many other future projects.
Hope the module is useful for you too. Appreciate any comments on it. Cheers!