// $has.js
(function () {
/*global adventurejs A*/
var p = adventurejs.Asset.prototype;
/**
* <strong>has</strong> is an alias to asset.isWithin()
* that reverses the direct and indirect objects, to test
* whether that asset is in this asset.
* <pre class="display"><code class="language-javascript">if( MyGame.$('crown').$has('jewel') ){ // do stuff }
* </code></pre>
* @memberOf adventurejs.Asset
* @method adventurejs.Asset#has
*/
p.$has = function Asset_$has(object) {
return object.isWithin(this);
};
})();