Created
January 29, 2011 23:01
-
-
Save indexzero/802294 to your computer and use it in GitHub Desktop.
Naming conventions in Javascript that I use personally
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
// | |
// PascalCase for ConstructorFunctions | |
// Found in: (constructor-function.js) | |
// | |
var ConstructorFunction = exports.ConstructorFunction = function () { | |
// Do Stuff here | |
}; | |
// | |
// camelCase for methodNames and variableNames | |
// | |
ConstructorFunction.prototype.someMethod = function () { | |
return null; | |
}; | |
// | |
// Code Consistency: Use (JSLint)[https://github.com/as-jpolo/node-lint] | |
// Documentation: Use (JSDoc)[https://github.com/visionmedia/dox] | |
// Testing: Use (Vows)[http://vowsjs.org] | |
// Database: Use (Cradle for CouchDB)[http://github.com/cloudhead/cradle] or (Mongoose for MongoDB)[https://github.com/learnboost/mongoose] | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment