Merge pull request #38 from asmblah/patch-1

[modules] Updated noConflict returns current after restore
This commit is contained in:
Harrison Shoff
2013-01-11 09:31:47 -08:00

View File

@@ -1170,7 +1170,7 @@
- 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.
- Add a method called noConflict() that sets the exported module to the previous version and returns this one.
- Always declare `'use strict';` at the top of the module.
```javascript
@@ -1187,6 +1187,7 @@
FancyInput.noConflict = function noConflict() {
global.FancyInput = previousFancyInput;
return FancyInput;
};
global.FancyInput = FancyInput;