Hello! I regard Object.prototype.hasOwnProperty.call(obj, propName) to be more save than using foo.hasOwnProperty(key). The latter is save according to ESLint: http://eslint.org/docs/rules/guard-for-in.html
Have a look here which is quoted as a further reading in the mentioned rule: Pitfall 2: overriding and invoking methods<http://www.2ality.com/2012/01/objects-as-maps.html> I would love to see a stricter checking therefore. Kind regards, René -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
