Add support for comparing array buffers to _.isEqual.

This commit is contained in:
John-David Dalton
2015-12-23 18:18:12 -06:00
parent 5e639d1704
commit 1c781389d2
2 changed files with 26 additions and 0 deletions

View File

@@ -4512,6 +4512,13 @@
*/
function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
switch (tag) {
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
// Coerce dates and booleans to numbers, dates to milliseconds and booleans