Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_customOmitClone.js 475B

12345678910111213141516
  1. var isPlainObject = require('./isPlainObject');
  2. /**
  3. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  4. * objects.
  5. *
  6. * @private
  7. * @param {*} value The value to inspect.
  8. * @param {string} key The key of the property to inspect.
  9. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  10. */
  11. function customOmitClone(value) {
  12. return isPlainObject(value) ? undefined : value;
  13. }
  14. module.exports = customOmitClone;