         let nspString = binaryCountString + (nsp != "/" ? "\(nsp)," : "")
         // Ack number?
         let idString = nspString + (id != -1 ? String(id) : "")
-        
+
         return completeMessage(idString)
     }
-    
+
     // Called when we have all the binary data for a packet
     // calls _fillInPlaceholders, which replaces placeholders with the
     // corresponding binary
     private mutating func fillInPlaceholders() {
         data = data.map(_fillInPlaceholders)
     }
-    
+
     // Helper method that looks for placeholders
     // If object is a collection it will recurse
     // Returns the object if it is not a placeholder or the corresponding

            } else {
                return dict.reduce(JSON(), {cur, keyValue in
                    var cur = cur
                    
                    cur[keyValue.0] = _fillInPlaceholders(keyValue.1)
                    
                    return cur
                })
            }

            return .error
        }
    }

    static func packetFromEmit(_ items: [Any], id: Int, nsp: String, ack: Bool) -> SocketPacket {
        let (parsedData, binary) = deconstructData(items)
        let packet = SocketPacket(type: findType(binary.count, ack: ack), data: parsedData,
            id: id, nsp: nsp, binary: binary)

        return packet
    }
}
