javascript - Missing name after . operator YUI Compressor for socket.io js files -
i trying use yui compressor socket.io based .js file (yes, know it's server side script , doesn't require minfication, it's requirement have less control). code this:
fs.readfile('../examples/example.xml', function(err, data) { if (err) throw err; // parsing new xml data , converting them json file var json = parser.tojson(data); // adding time of last update json.time = new date(); // send new data client socket.volatile.emit('notification', json); });
when execute yui compressor error @ line:
socket.volatile.emit('notification', json); [error] 36:22:missing name after . operator
i assume throwing error becase volatile keyword right? can guide me how rid of error.
no compressor mess reserved words if enclosed in quotes
socket['volatile'].emit()
Comments
Post a Comment