source: frontend/node_modules/underscore/cjs/mixin.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 620 bytes
Line 
1var underscore = require('./underscore.js');
2var each = require('./each.js');
3var functions = require('./functions.js');
4var _setup = require('./_setup.js');
5var _chainResult = require('./_chainResult.js');
6
7// Add your own custom functions to the Underscore object.
8function mixin(obj) {
9 each(functions(obj), function(name) {
10 var func = underscore[name] = obj[name];
11 underscore.prototype[name] = function() {
12 var args = [this._wrapped];
13 _setup.push.apply(args, arguments);
14 return _chainResult(this, func.apply(underscore, args));
15 };
16 });
17 return underscore;
18}
19
20module.exports = mixin;
Note: See TracBrowser for help on using the repository browser.