Tag Archives: object

JavaScript deterministic object stringify

For some time I needed to use objects as a hash table (associative array) key in JavaScript, and for all that time I skillfully evaded to wrap my head around it. JavaScript objects (hash tables/associative arrays) are unordered data sets which means that the property (key) order isn’t guaranteed. I believed that for(var i in […]

JavaScript object comparison

Function for deep comparison of object instances and arrays in JavaScript. It compares all data types except functions, because functions are not data, nor they should contain it. All functions should be unique, two same functions don’t make sense and/or use. This article covers the detailed explanation of an approach to solve the deep object […]