This commit is contained in:
tatianamac
2019-11-26 14:50:43 -08:00
parent 8a55660ed0
commit 6d5445ecc5
13894 changed files with 2233957 additions and 0 deletions

36
node_modules/engine.io/lib/transports/index.js generated vendored Normal file
View File

@ -0,0 +1,36 @@
/**
* Module dependencies.
*/
var XHR = require('./polling-xhr');
var JSONP = require('./polling-jsonp');
/**
* Export transports.
*/
module.exports = exports = {
polling: polling,
websocket: require('./websocket')
};
/**
* Export upgrades map.
*/
exports.polling.upgradesTo = ['websocket'];
/**
* Polling polymorphic constructor.
*
* @api private
*/
function polling (req) {
if ('string' === typeof req._query.j) {
return new JSONP(req);
} else {
return new XHR(req);
}
}