Skip to content

Commit

Permalink
增加测试
Browse files Browse the repository at this point in the history
  • Loading branch information
xhan committed Mar 20, 2014
1 parent fe2b6e2 commit 9a09b92
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/func_args.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env coffee


# 2 ways to call it
# url, params, callback or
# url, callback
#
http_get = (args...) ->
[url,params,callback] = args
[params,callback] = [null,params] unless callback
console.log url
console.log params
console.log callback



http_get(1,2,3)

0 comments on commit 9a09b92

Please sign in to comment.