Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// $can.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Asset.prototype;

  /**
   * <strong>$can()</strong> is a general method for
   * getting at asset properties stored in asset.can.
   * @method adventurejs.Asset#$can
   * @memberOf adventurejs.Asset
   */
  p.$can = function Asset_can(property, asset) {
    if (!property || !asset) return false;
    return asset.can[property] ? true : false;
  };
})();