lib/inventory.js
function unEquip (attributes, slotName) {
        if (!(slotName in attributes.equipped)) {
            throw new SlotNameError(slotName);
        }

        if (attributes.equipped[slotName]) {
            attributes.inventory.push(attributes.equipped[slotName]);
        }

        attributes.equipped[slotName] = null;

        return attributes;
    }
function unEquip (attributes, slotName) {
        if (!(slotName in attributes.equipped)) {
            throw new SlotNameError(slotName);
        }

        if (attributes.equipped[slotName]) {
            attributes.inventory.push(attributes.equipped[slotName]);
        }

        attributes.equipped[slotName] = null;

        return attributes;
    }
function unEquip ( attributes , slotName ) { if ( ! ( slotName in attributes . equipped ) ) { throw new SlotNameError ( slotName ) ; } if ( attributes . equipped [ slotName ] ) { attributes . inventory . push ( attributes . equipped [ slotName ] ) ; } attributes . equipped [ slotName ] = null ; return attributes ; }
Unequips item from given slotName
@param {Attributes} attributes which object should be operated. In Mongoose it this, in Backbone it's this.attributes
@param {String} slotName
Unequips item from given slotName