mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Make _.clone follow the structured cloning algorithm's behavior for cloning objects created by constructors other than Object and make _.isEqual equate objects to arguments objects.
Former-commit-id: a387c6444694d8d550ab463ea5290088d3356d8b
This commit is contained in:
@@ -243,17 +243,17 @@
|
||||
Klass.prototype = { 'b': 1 };
|
||||
|
||||
var nonCloneable = {
|
||||
'an arguments object': arguments,
|
||||
'an element': window.document && document.body,
|
||||
'a function': Klass,
|
||||
'a Klass instance': new Klass
|
||||
'a function': Klass
|
||||
};
|
||||
|
||||
var objects = {
|
||||
'an arguments object': arguments,
|
||||
'an array': ['a', 'b', 'c', ''],
|
||||
'an array-like-object': { '0': 'a', '1': 'b', '2': 'c', '3': '', 'length': 5 },
|
||||
'boolean': false,
|
||||
'boolean object': Object(false),
|
||||
'a Klass instance': new Klass,
|
||||
'an object': { 'a': 0, 'b': 1, 'c': 3 },
|
||||
'an object with object values': { 'a': /a/, 'b': ['B'], 'c': { 'C': 1 } },
|
||||
'an object from another document': _._object || {},
|
||||
|
||||
Reference in New Issue
Block a user