Merge branch 'master' of github.com:airbnb/javascript

* 'master' of github.com:airbnb/javascript:
  capitalizing types that are constructors
  Switched modules to bang-style.
This commit is contained in:
Harrison Shoff
2012-11-01 23:06:37 -07:00

View File

@@ -37,9 +37,9 @@
- **Primitives**: When you access a primitive type you work directly on its value
+ `string`
+ `number`
+ `boolean`
+ `String`
+ `Number`
+ `Boolean`
+ `null`
+ `undefined`
@@ -53,9 +53,9 @@
```
- **Complex**: When you access a complex type you work on a reference to its value
+ `object`
+ `array`
+ `function`
+ `Object`
+ `Array`
+ `Function`
```javascript
var foo = [1, 2],
@@ -1087,6 +1087,7 @@
## <a name='modules'>Modules</a>
- The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated.
- The file should be named with camelCase, live in a folder with the same name, and match the name of the single export.
- Add a method called noConflict() that sets the exported module to the previous version.
- Always declare `'use strict;'` at the top of the module.
@@ -1094,7 +1095,7 @@
```javascript
// fancyInput/fancyInput.js
(function(global) {
!function(global) {
'use strict';
var previousFancyInput = global.FancyInput;
@@ -1108,7 +1109,7 @@
};
global.FancyInput = FancyInput;
})(this);
}(this);
```
**[[⬆]](#TOC)**