UNPKG

node-express-mongodb-jwt-rest-api-skeleton

Version:

Node.js express.js MongoDB JWT REST API - This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API)

11 lines (9 loc) 260 B
/** * Hack for mongoose-paginate, removes 'id' from results * @param {Object} result - result object */ const cleanPaginationID = (result = {}) => { result.docs.map((element) => delete element.id) return result } module.exports = { cleanPaginationID }