source: frontend/node_modules/underscore/modules/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: 543 bytes
Line 
1import _ from './underscore.js';
2import each from './each.js';
3import functions from './functions.js';
4import { push } from './_setup.js';
5import chainResult from './_chainResult.js';
6
7// Add your own custom functions to the Underscore object.
8export default function mixin(obj) {
9 each(functions(obj), function(name) {
10 var func = _[name] = obj[name];
11 _.prototype[name] = function() {
12 var args = [this._wrapped];
13 push.apply(args, arguments);
14 return chainResult(this, func.apply(_, args));
15 };
16 });
17 return _;
18}
Note: See TracBrowser for help on using the repository browser.