Created
June 23, 2015 15:40
-
-
Save pranavgarg/e33acfcf72201b58a40e to your computer and use it in GitHub Desktop.
Meteor Best Practices
This file contains 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
### | |
Install: meteor add audit-argument-checks | |
Description: This package will do type checking for the arguments. | |
E.g. Publish function sending data back based on the username | |
### | |
Meteor.publish({ | |
"posts": (currentUserName) -> | |
check currentUserName, String #this line does the typechecking. If missed following error thrown Exception from sub posts id .. Did not check() all arguments during publisher | |
Posts.find({author: currentUserName}).fields({}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment