Node.js: Style and structure
caolanmcmahon.com2 pointsby pxm0 comments
elem.data('foo', { 'a':1, 'b':2 });
elem.data('foo'); // Returns the object
Is certainly more desirable than: elem.attr('foo', { 'a':1, 'b':2 });
elem.attr('foo'); // Returns "[object Object]"