Last active
December 20, 2015 00:09
-
-
Save raix/6040192 to your computer and use it in GitHub Desktop.
Syntax tree Meteor.isClient = false
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// code = 'server'; | |
{ | |
"type": "Program", | |
"body": [ | |
{ | |
"type": "ExpressionStatement", | |
"expression": { | |
"type": "AssignmentExpression", | |
"operator": "=", | |
"left": { | |
"type": "Identifier", | |
"name": "code" | |
}, | |
"right": { | |
"type": "Literal", | |
"value": "server", | |
"raw": "'server'" | |
} | |
} | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if (Meteor.isClient) { | |
// code = 'client'; | |
// } else { | |
// code = 'server'; | |
// } | |
{ | |
"type": "Program", | |
"body": [ | |
{ | |
"type": "IfStatement", | |
"test": { | |
"type": "MemberExpression", | |
"computed": false, | |
"object": { | |
"type": "Identifier", | |
"name": "Meteor" | |
}, | |
"property": { | |
"type": "Identifier", | |
"name": "isClient" | |
} | |
}, | |
"consequent": { | |
"type": "BlockStatement", | |
"body": [ | |
{ | |
"type": "ExpressionStatement", | |
"expression": { | |
"type": "AssignmentExpression", | |
"operator": "=", | |
"left": { | |
"type": "Identifier", | |
"name": "code" | |
}, | |
"right": { | |
"type": "Literal", | |
"value": "client", | |
"raw": "'client'" | |
} | |
} | |
} | |
] | |
}, | |
"alternate": { | |
"type": "BlockStatement", | |
"body": [ | |
{ | |
"type": "ExpressionStatement", | |
"expression": { | |
"type": "AssignmentExpression", | |
"operator": "=", | |
"left": { | |
"type": "Identifier", | |
"name": "code" | |
}, | |
"right": { | |
"type": "Literal", | |
"value": "server", | |
"raw": "'server'" | |
} | |
} | |
} | |
] | |
} | |
} | |
] | |
} |
Stripping code, sorry about the late response, Got no notifications
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you explain what is this for?