Add docs to clarify what values are supported by _.clone and _.isEqual. [ci skip]

This commit is contained in:
John-David Dalton
2015-12-23 00:56:41 -06:00
parent a8de2ca410
commit 8e64432e2c

View File

@@ -9067,11 +9067,13 @@
* Creates a shallow clone of `value`. * Creates a shallow clone of `value`.
* *
* **Note:** This method is loosely based on the * **Note:** This method is loosely based on the
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
* The enumerable properties of `arguments` objects and objects created by * and supports cloning arrays, array buffers, booleans, date objects, maps,
* constructors other than `Object` are cloned to plain `Object` objects. An * numbers, `Object` objects, regexes, sets, strings, symbols, and typed arrays.
* empty object is returned for uncloneable values such as functions, DOM nodes, * The own enumerable properties of `arguments` objects and objects created
* Maps, Sets, and WeakMaps. * by constructors other than `Object` are cloned as plain `Object` objects.
* An empty object is returned for uncloneable values such as error objects,
* functions, DOM nodes, and WeakMaps.
* *
* @static * @static
* @memberOf _ * @memberOf _
@@ -9464,10 +9466,11 @@
* Performs a deep comparison between two values to determine if they are * Performs a deep comparison between two values to determine if they are
* equivalent. * equivalent.
* *
* **Note:** This method supports comparing arrays, booleans, `Date` objects, * **Note:** This method supports comparing arrays, array buffers, booleans,
* numbers, `Object` objects, regexes, and strings. Objects are compared by * date objects, error objects, maps, numbers, `Object` objects, regexes,
* their own, not inherited, enumerable properties. Functions and DOM nodes * sets, strings, symbols, and typed arrays. `Object` objects are compared
* are **not** supported. * by their own, not inherited, enumerable properties. Functions and DOM
* nodes are **not** supported.
* *
* @static * @static
* @memberOf _ * @memberOf _