src/topiarist.js
function isA(instance, parent) {
	if(instance == null) {
		assertArgumentNotNullOrUndefined(instance, ERROR_MESSAGES.NULL, 'Object', 'isA');
	}

	// sneaky edge case where we're checking against an object literal we've mixed in or against a prototype of
	//  something.
	if (typeof parent === 'object' && parent.hasOwnProperty('constructor')) {
		parent = parent.constructor;
	}

	if((instance.constructor === parent) || (instance instanceof parent)) {
		return true;
	}

	return classIsA(instance.constructor, parent);
}
function isA(instance, parent) {
	if(instance == null) {
		assertArgumentNotNullOrUndefined(instance, ERROR_MESSAGES.NULL, 'Object', 'isA');
	}

	// sneaky edge case where we're checking against an object literal we've mixed in or against a prototype of
	//  something.
	if (typeof parent === 'object' && parent.hasOwnProperty('constructor')) {
		parent = parent.constructor;
	}

	if((instance.constructor === parent) || (instance instanceof parent)) {
		return true;
	}

	return classIsA(instance.constructor, parent);
}
function isA ( instance , parent ) { if ( instance == null ) { assertArgumentNotNullOrUndefined ( instance , ERROR_MESSAGES . NULL , 'Object' , 'isA' ) ; } // sneaky edge case where we're checking against an object literal we've mixed in or against a prototype of //  something. if ( typeof parent === 'object' && parent . hasOwnProperty ( 'constructor' ) ) { parent = parent . constructor ; } if ( ( instance . constructor === parent ) || ( instance instanceof parent ) ) { return true ; } return classIsA ( instance . constructor , parent ) ; }
Checks to see if an instance is defined to be a child of a parent.

@memberOf topiarist
@param {Object} instance An instance object to check.
@param {function} parent A potential parent (see classIsA).
@returns {boolean} true if this instance has been constructed from something that is assignable from the parent
or is null, false otherwise.
Checks to see if an instance is defined to be a child of a parent .