Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
//validateClassList.js
/*global adventurejs A*/ 

/**
 * Validate a list of classes. Unused?
 * @method adventurejs.Game#validateClassList
 * @memberOf adventurejs.Game
 * @param {String|Array} property 
 * @returns {Array}
 * @todo Is this unused?
 */

adventurejs.validateClassList = function Adventurejs_validateClassList( property )
{
  // "use strict";
  if( "string" === typeof property ) 
  {
    property = adventurejs.stringToArray( property );
  }
  for(var i = 0; i < property.length; i++ )
  {
    if( !A[ property[i] ] )
    {
      property[i] = null;
    }
  }
  return property;
};