* Creates a clone of `value`. If `isDeep` is `true` nested objects will also * be cloned, otherwise they will be assigned by reference. If a callback * is provided it will be executed to produce the cloned values. If the * callback returns `undefined` cloning will be handled by the me
(value, isDeep, callback, thisArg)
| 36878 | * // => 0 |
| 36879 | */ |
| 36880 | function clone(value, isDeep, callback, thisArg) { |
| 36881 | // allows working with "Collections" methods without using their `index` |
| 36882 | // and `collection` arguments for `isDeep` and `callback` |
| 36883 | if (typeof isDeep != 'boolean' && isDeep != null) { |
| 36884 | thisArg = callback; |
| 36885 | callback = isDeep; |
| 36886 | isDeep = false; |
| 36887 | } |
| 36888 | return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1)); |
| 36889 | } |
| 36890 | |
| 36891 | /** |
| 36892 | * Creates a deep clone of `value`. If a callback is provided it will be |
nothing calls this directly
no test coverage detected