Showing 35 of 78 total issues
File socket.io.js
has 1660 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! Socket.IO.js build:0.9.16, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed */
var io = ('undefined' === typeof module ? {} : module.exports);
(function () {
Function exports
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.config.set('sails-linker', {
devJs: {
options: {
Function str
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
Function perform
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
perform: function (job, done, context) {
let fileName = job.data.fileName;
let retryCounter = job.data.retryCounter || 0;
let _vPath = '';
Function decodePacket
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parser.decodePacket = function (data) {
var pieces = data.match(regexp);
if (!pieces) return {};
Function reconnect
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Socket.prototype.reconnect = function () {
this.reconnecting = true;
this.reconnectionAttempts = 0;
this.reconnectionDelay = this.options['reconnection delay'];
Function post
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
JSONPPolling.prototype.post = function (data) {
var self = this
, query = io.util.query(
this.socket.options.query
, 't=' + (+new Date) + '&i=' + this.index
Function onPacket
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SocketNamespace.prototype.onPacket = function (packet) {
var self = this;
function ack() {
self.packet({
Function connect
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Socket.prototype.connect = function (fn) {
if (this.connecting) {
return this;
}
Function handshake
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Socket.prototype.handshake = function (fn) {
var self = this
, options = this.options;
function complete(data) {
Function encodePacket
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parser.encodePacket = function (packet) {
var type = indexOf(packets, packet.type)
, id = packet.id || ''
, endpoint = packet.endpoint || ''
, ack = packet.ack
Function exports
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// Load the include-all library in order to require all of our grunt
// configurations and task registrations dynamically.
Function Socket
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Socket(options) {
this.options = {
port: 80
, secure: false
, document: 'document' in global ? document : false
Function get
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
XHRPolling.prototype.get = function () {
if (!this.isOpen) return;
var self = this;
Function parse
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
Function maybeReconnect
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function maybeReconnect() {
if (!self.reconnecting) {
return;
}
Function notFound
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function notFound (data, options) {
// Get access to `req`, `res`, & `sails`
var req = this.req;
var res = this.res;
Function exports
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (req, res, next) {
var grantType = req.param('grant_type');
if (!grantType) {
return res.send(400, 'missing grant_type parameter');
Function forbidden
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function forbidden (data, options) {
// Get access to `req`, `res`, & `sails`
var req = this.req;
var res = this.res;
Function serverError
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function serverError (data, options) {
// Get access to `req`, `res`, & `sails`
var req = this.req;
var res = this.res;