* Null safe way of checking whether or not an object, * including its prototype, has a given property
(obj, propName)
| 42 | * including its prototype, has a given property |
| 43 | */ |
| 44 | function hasProperty (obj, propName) { |
| 45 | return obj != null && typeof obj === 'object' && (propName in obj); |
| 46 | } |
| 47 | |
| 48 | // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577 |
| 49 | // See https://github.com/janl/mustache.js/issues/189 |