function propertyNamesIn( value ) {
	var names;
	var obj;
	var tmp;
	var i;

	if ( value === null || value === void 0 ) {
		return [];
	}
	// Cast the value to an object:
	obj = Object( value );

	// Walk the prototype chain collecting all enumerable and non-enumerable property names...
	names = [];
	do {
		tmp = getOwnPropertyNames( obj );
		for ( i = 0; i < tmp.length; i++ ) {
			if ( contains( names, tmp[ i ] ) === false ) {
				names.push( tmp[ i ] );
			}
		}
		obj = getPrototypeOf( obj );
	} while ( obj );

	return names;
}
Returns an array of an object's own and inherited enumerable and non-enumerable property names.

## Notes

-   In contrast to the built-in `Object.getOwnPropertyNames()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.

@param {*} value - input object
@returns {Array} a list of own and inherited property names

@example
var obj = {
    'beep': 'boop',
    'foo': 3.14
};

var keys = propertyNamesIn( obj );
// e.g., returns [ 'beep', 'foo', ... ]