lib/utils.js
function getAllPropertyNames(obj) {
	var props = [];

	do {
		Object.getOwnPropertyNames( obj ).forEach(function ( prop ) {
			if ( props.indexOf( prop ) === -1 ) {
				props.push( prop );
			}
		});
	} while (obj = Object.getPrototypeOf(obj));

	return props;
}
function getAllPropertyNames(obj) {
	var props = [];

	do {
		Object.getOwnPropertyNames( obj ).forEach(function ( prop ) {
			if ( props.indexOf( prop ) === -1 ) {
				props.push( prop );
			}
		});
	} while (obj = Object.getPrototypeOf(obj));

	return props;
}
/*
Private function to get all keys, including non-enumerable ones.

Thanks to airportyh who posted this function on StackOverflow:
http://stackoverflow.com/questions/8024149/is-it-possible-to-get-the-non-enumerable-inherited-property-names-of-an-object