Plato on Github
Report Home
helpers.js
Maintainability
63.44
Estimated # Bugs
0.10
Difficulty
14.57
SLOC/LSLOC
25 / 11
Function weight
By Complexity
By SLOC
// Helpers // ------- // For slicing `arguments` in functions var slice = Array.prototype.slice; // Marionette.extend // ----------------- // Borrow the Backbone `extend` method so we can use it as needed Marionette.extend = Backbone.Model.extend; // Marionette.getOption // -------------------- // Retrieve an object, function or other value from a target // object or it's `options`, with `options` taking precedence. Marionette.getOption = function(target, optionName){ if (!target || !optionName){ return; } var value; if (target.options && (optionName in target.options) && (target.options[optionName] !== undefined)){ value = target.options[optionName]; } else { value = target[optionName]; } return value; };