Version: 0.1.00.2.00.2.10.2.20.3.00.3.10.3.20.4.00.4.10.4.20.5.0-rc.10.5.00.5.10.5.20.6.00.6.10.7.00.8.00.8.10.8.20.9.00.9.10.9.20.10.01.0.0-rc.11.0.0-rc.21.0.0-rc.31.0.01.0.11.0.21.1.01.1.11.2.01.2.11.3.01.3.12.0.02.1.02.2.02.2.12.3.02.4.02.4.12.4.23.0.03.0.13.1.03.2.03.3.03.3.13.4.03.5.03.6.03.7.03.8.03.9.03.9.13.9.23.9.33.10.03.10.14.0.04.0.14.1.04.2.04.2.14.3.04.4.04.5.04.5.14.6.04.6.14.7.04.8.04.8.14.8.24.9.04.10.04.11.04.11.14.11.24.12.04.13.04.13.14.14.04.14.14.14.24.15.04.16.04.16.14.16.24.16.34.16.44.16.54.16.64.17.04.17.14.17.24.17.34.17.44.17.54.17.94.17.104.17.114.17.124.17.134.17.144.17.154.17.164.17.174.17.184.17.194.17.204.17.21
var baseClone = require('./_baseClone');
/** Used to compose bitmasks for cloning. */
var CLONE_SYMBOLS_FLAG = 4;
/**
* Creates a shallow clone of `value`.
*
* **Note:** This method is loosely based on the
* [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
* and supports cloning arrays, array buffers, booleans, date objects, maps,
* numbers, `Object` objects, regexes, sets, strings, symbols, and typed
* arrays. The own enumerable properties of `arguments` objects are cloned
* as plain objects. An empty object is returned for uncloneable values such
* as error objects, functions, DOM nodes, and WeakMaps.
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to clone.
* @returns {*} Returns the cloned value.
* @see _.cloneDeep
* @example
* var objects = [{ 'a': 1 }, { 'b': 2 }];
* var shallow = _.clone(objects);
* console.log(shallow[0] === objects[0]);
* // => true
*/
function clone(value) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
module.exports = clone;