mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
changed function( to function (
This commit is contained in:
parent
26f3d22db7
commit
7e5eeb0a27
36 changed files with 209 additions and 209 deletions
|
|
@ -2,21 +2,21 @@ define([
|
|||
"Game/Core/Protocol/Parser"
|
||||
],
|
||||
|
||||
function(Parser) {
|
||||
function (Parser) {
|
||||
|
||||
var Helper = {}
|
||||
|
||||
Helper.encodeCommand = function(command, options){
|
||||
Helper.encodeCommand = function (command, options){
|
||||
return Parser.encode(Helper.assemble(command, options));
|
||||
}
|
||||
|
||||
Helper.assemble = function(command, options){
|
||||
Helper.assemble = function (command, options){
|
||||
var commands = {};
|
||||
commands[command] = options || null;
|
||||
return commands;
|
||||
}
|
||||
|
||||
Helper.runCommands = function(message, callback){
|
||||
Helper.runCommands = function (message, callback){
|
||||
var commands = Parser.decode(message);
|
||||
|
||||
for(var command in commands) {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
define([
|
||||
],
|
||||
|
||||
function() {
|
||||
function () {
|
||||
|
||||
var Parser = {};
|
||||
|
||||
Parser.encode = function(message){
|
||||
Parser.encode = function (message){
|
||||
return JSON.stringify(message);
|
||||
}
|
||||
|
||||
Parser.decode = function(message){
|
||||
Parser.decode = function (message){
|
||||
return JSON.parse(message);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue