Show HN: Nothing.js – A chainable mock object which always returns itself 8 years ago
Law of demeter applies to code, but in JS the deep property access is actually done often against data (deserialized JSON).
HN user
Law of demeter applies to code, but in JS the deep property access is actually done often against data (deserialized JSON).
This would really benefit from adding comments in the 'how to use' code samples, or at least using standard foos and baars to make it clear what is user code and what is part of Nothing.js.
For example it is not really clear if 'executeAction()' etc are part of Nothing.js. I assumed they were, but then the next sample seems to do property chain traversal transparently, without them.