src/index.js
function _deepKeys(obj, prefix = null) {
  return Object.keys(obj).reduce(function(acc, key){
    var value = obj[key];

    if (_isObject(value)) {
      acc.push.apply(acc, _deepKeys(value, prefix ? prefix + '.' + key : key));
    } else {
      acc.push(prefix ? prefix + '.' + key : key);
    }

    return acc;
  }, []);
}
function _deepKeys(obj, prefix = null) {
  return Object.keys(obj).reduce(function(acc, key){
    var value = obj[key];

    if (_isObject(value)) {
      acc.push.apply(acc, _deepKeys(value, prefix ? prefix + '.' + key : key));
    } else {
      acc.push(prefix ? prefix + '.' + key : key);
    }

    return acc;
  }, []);
}
function _deepKeys ( obj , prefix = null ) { return Object . keys ( obj ) . reduce ( function ( acc , key ) { var value = obj [ key ] ; if ( _isObject ( value ) ) { acc . push . apply ( acc , _deepKeys ( value , prefix ? prefix + '.' + key : key ) ) ; } else { acc . push ( prefix ? prefix + '.' + key : key ) ; } return acc ; } , [ ] ) ; }
Get all keys for the given object recursively

Ex: { user: { email: 'foo@bar.com', id: 2 } } => ['user.email', 'user.id']
Get all keys for the given object recursively