Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// getNestPreposition.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Character.prototype;
  /**
   * Returns the preposition of this asset's parent
   * aspect, or a blank string.
   * @memberOf adventurejs.Character
   * @method adventurejs.Character#getNestPreposition
   * @return {Array}
   */
  p.getNestPreposition = function Character_getNestPreposition() {
    if (
      "undefined" === typeof this.nest ||
      Object.keys(this.nest).length === 0
    ) {
      return "";
    }
    return Object.keys(this.nest)[0];
  };
})();