Eliminating duplicate JavaScript objects: Three approaches
2ality.com