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