Buckets:
dieumercimvemba/mediastore / scripts /whatsapp-bridge /node_modules /express /lib /middleware /query.js
| /*! | |
| * express | |
| * Copyright(c) 2009-2013 TJ Holowaychuk | |
| * Copyright(c) 2013 Roman Shtylman | |
| * Copyright(c) 2014-2015 Douglas Christopher Wilson | |
| * MIT Licensed | |
| */ | |
| ; | |
| /** | |
| * Module dependencies. | |
| */ | |
| var merge = require('utils-merge') | |
| var parseUrl = require('parseurl'); | |
| var qs = require('qs'); | |
| /** | |
| * @param {Object} options | |
| * @return {Function} | |
| * @api public | |
| */ | |
| module.exports = function query(options) { | |
| var opts = merge({}, options) | |
| var queryparse = qs.parse; | |
| if (typeof options === 'function') { | |
| queryparse = options; | |
| opts = undefined; | |
| } | |
| if (opts !== undefined && opts.allowPrototypes === undefined) { | |
| // back-compat for qs module | |
| opts.allowPrototypes = true; | |
| } | |
| return function query(req, res, next){ | |
| if (!req.query) { | |
| var val = parseUrl(req).query; | |
| req.query = queryparse(val, opts); | |
| } | |
| next(); | |
| }; | |
| }; | |
Xet Storage Details
- Size:
- 885 Bytes
- Xet hash:
- a7d86b8742094d3197a2bd109e20471ad661dd32b6bfbc42abe2ef3c403cd90a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.