UNPKG

@unito/integration-sdk

Version:

Integration SDK

12 lines (11 loc) 317 B
function extractSelects(req, res, next) { const rawSelect = req.query.select; if (typeof rawSelect === 'string') { res.locals.selects = rawSelect.split(',').map(select => decodeURIComponent(select)); } else { res.locals.selects = []; } next(); } export default extractSelects;