6 ms·
Why would you use mockObject.getPath('/baz/zar/zog') over mockObject.baz.zar.zog? Unless getPath is null safe and you expect that sometimes part of the chain do
by blktiger 12y ago
Why would you use mockObject.getPath('/baz/zar/zog') over mockObject.baz.zar.zog? Unless getPath is null safe and you expect that sometimes part of the chain doesn't exist, but the docs for getPath don't indicate that as a feature.
- nailer 12y ago> Unless getPath is null safe and you expect that sometimes part of the chain doesn't exist Yes, that's exactly why. > the docs for getPath don't indicate that as a feature. The docs currently state 'If any of the keys are missing, return undefined. ' Perhaps they should be more explicit? If so I'm happy to take suggestions / pull requests.
- blktiger 12y agoI must have missed that in the docs.