Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foo (a) ->
- if x? then y
- # generates
- # foo(function(a) {
- # return (typeof x !== "undefined" && x !== null) ? y : undefined;
- # });
- # However, if you are checking for the existence of a param to the function, then no undefined check
- foo (x) ->
- if x? then y
- # foo(function(x) {
- # return (x != null) ? y : undefined;
- # });
Add Comment
Please, Sign In to add comment