tscheck.js
function hasBrand(value, brand) {
	var ctor = lookupPath(brand, function() { return null })
	if (!ctor || typeof ctor !== 'object')
		return null;
	var proto = lookupObject(ctor.key).propertyMap.get('prototype')
	if (!proto || !proto.value || typeof proto.value !== 'object')
		return null;
	while (value && typeof value === 'object') {
		if (value.key === proto.value.key)
			return true
		value = lookupObject(value.key).prototype
	}
	return false;
}
function hasBrand(value, brand) {
	var ctor = lookupPath(brand, function() { return null })
	if (!ctor || typeof ctor !== 'object')
		return null;
	var proto = lookupObject(ctor.key).propertyMap.get('prototype')
	if (!proto || !proto.value || typeof proto.value !== 'object')
		return null;
	while (value && typeof value === 'object') {
		if (value.key === proto.value.key)
			return true
		value = lookupObject(value.key).prototype
	}
	return false;
}
function hasBrand ( value , brand ) { var ctor = lookupPath ( brand , function ( ) { return null } ) if ( ! ctor || typeof ctor !== 'object' ) return null ; var proto = lookupObject ( ctor . key ) . propertyMap . get ( 'prototype' ) if ( ! proto || ! proto . value || typeof proto . value !== 'object' ) return null ; while ( value && typeof value === 'object' ) { if ( value . key === proto . value . key ) return true value = lookupObject ( value . key ) . prototype } return false ; }
Returns true if brand is satisfied, false if brand is not satisfied, or null if brand prototype could not be found.
Returns true if brand is satisfied false if brand is not satisfied or null if brand prototype could not be found .