Buckets:
tahamajs/Other_Lessons / AP /TA_1 /AP-ECE-UT.github.io /node_modules /value-equal /esm /value-equal.js
| function valueOf(obj) { | |
| return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj); | |
| } | |
| function valueEqual(a, b) { | |
| // Test for strict equality first. | |
| if (a === b) return true; | |
| // Otherwise, if either of them == null they are not equal. | |
| if (a == null || b == null) return false; | |
| if (Array.isArray(a)) { | |
| return ( | |
| Array.isArray(b) && | |
| a.length === b.length && | |
| a.every(function(item, index) { | |
| return valueEqual(item, b[index]); | |
| }) | |
| ); | |
| } | |
| if (typeof a === 'object' || typeof b === 'object') { | |
| var aValue = valueOf(a); | |
| var bValue = valueOf(b); | |
| if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue); | |
| return Object.keys(Object.assign({}, a, b)).every(function(key) { | |
| return valueEqual(a[key], b[key]); | |
| }); | |
| } | |
| return false; | |
| } | |
| export default valueEqual; | |
Xet Storage Details
- Size:
- 860 Bytes
- Xet hash:
- 5e7e2d59afd8ab12156d21577adb3ead8ebff4b9da224b0a6856f7e87b9df1bc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.