Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

omit.js 678B

1234567891011121314151617181920
  1. define(['./isFunction', './_flatten', './restArguments', './contains', './negate', './map', './pick'], function (isFunction, _flatten, restArguments, contains, negate, map, pick) {
  2. // Return a copy of the object without the disallowed properties.
  3. var omit = restArguments(function(obj, keys) {
  4. var iteratee = keys[0], context;
  5. if (isFunction(iteratee)) {
  6. iteratee = negate(iteratee);
  7. if (keys.length > 1) context = keys[1];
  8. } else {
  9. keys = map(_flatten(keys, false, false), String);
  10. iteratee = function(value, key) {
  11. return !contains(keys, key);
  12. };
  13. }
  14. return pick(obj, iteratee, context);
  15. });
  16. return omit;
  17. });