source: frontend/node_modules/underscore/amd/omit.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: 678 bytes
Line 
1define(['./restArguments', './isFunction', './negate', './map', './_flatten', './contains', './pick'], function (restArguments, isFunction, negate, map, _flatten, contains, pick) {
2
3 // Return a copy of the object without the disallowed properties.
4 var omit = restArguments(function(obj, keys) {
5 var iteratee = keys[0], context;
6 if (isFunction(iteratee)) {
7 iteratee = negate(iteratee);
8 if (keys.length > 1) context = keys[1];
9 } else {
10 keys = map(_flatten(keys, false, false), String);
11 iteratee = function(value, key) {
12 return !contains(keys, key);
13 };
14 }
15 return pick(obj, iteratee, context);
16 });
17
18 return omit;
19
20});
Note: See TracBrowser for help on using the repository browser.