mustache.js
function primitiveHasOwnProperty (primitive, propName) {  
    return (
      primitive != null
      && typeof primitive !== 'object'
      && primitive.hasOwnProperty
      && primitive.hasOwnProperty(propName)
    );
  }
function primitiveHasOwnProperty (primitive, propName) {  
    return (
      primitive != null
      && typeof primitive !== 'object'
      && primitive.hasOwnProperty
      && primitive.hasOwnProperty(propName)
    );
  }
function primitiveHasOwnProperty ( primitive , propName ) { return ( primitive != null && typeof primitive !== 'object' && primitive . hasOwnProperty && primitive . hasOwnProperty ( propName ) ) ; }
Safe way of detecting whether or not the given thing is a primitive and
whether it has the given property
Safe way of detecting whether or not the given thing is a primitive and whether it has the given property