has.js 211 B

123456789101112131415
  1. var get = require('./get');
  2. var UNDEF;
  3. /**
  4. * Check if object has nested property.
  5. */
  6. function has(obj, prop){
  7. return get(obj, prop) !== UNDEF;
  8. }
  9. module.exports = has;