Created
          June 6, 2013 05:13 
        
      - 
      
- 
        Save cammerman/5719456 to your computer and use it in GitHub Desktop. 
  
    
      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
    
  
  
    
  | define( | |
| ['underscore'], | |
| function (_) { | |
| // Outputs "true" | |
| console.log(_.deepClone !== undefined); | |
| } | |
| ); | 
  
    
      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
    
  
  
    
  | require.config({ | |
| map: { | |
| '*': { | |
| 'underscore': 'underscore-extensions' | |
| }, | |
| 'underscore-extensions': { | |
| 'underscore': 'underscore' | |
| } | |
| } | |
| }); | 
  
    
      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
    
  
  
    
  | // This is a shim module that adds functionality to Underscore.js that we want to be availabla | |
| // everywhere within our project. | |
| define( | |
| ['underscore'], | |
| function (_) { | |
| // define extra helpers attached to _ | |
| _.deepClone = function () { | |
| /* ... */ | |
| } | |
| return _; | |
| } | |
| ); | 
  
    
      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
    
  
  
    
  | // This is just the real underscore file. | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment