UnderscoreJS
I will introduce you to one more JavaScript framework that can be helpful in development. UnderscoreJS (http://underscorejs.org/) is a framework that brings functional programming constructs and techniques to the language. The library contains over 100 methods that add functional support to JavaScript.
UnderscoreJS is a single JavaScript file downloaded just like jQuery and RequireJS. If you add the requisite versioned underscore.js
file to the /js/lib
folder, then you already have the means to inject it into your application. Here is the additional configuration in the file, require-setup.js
:
var require = { shim: { "bootstrap" : { "deps" :['jquery'] }, "jquery": { exports: '$' }, "underscore": { exports: '_'} }, paths: { "jquery" : "jquery-2.1.3", "bootstrap" : "bootstrap-3.2.0", "underscore" : "underscore-1.8.2" } };
UnderscoreJS exports the symbol underscore (_
) for its library to a developer and its function methods are accessible through...