title: Preset Options in Object and see if it doesn't exist in allowed properties
body: <p>I am trying to make a preset list of options that are allowed in my object list. Here is code</p>
  
  <pre><code>var a = function(cmd, options){
       var objList = [options.search ,options.demand];
  
      if(!(options in objList)){
        console.warn('Not an Allowed * in the options Property');
        }
   }; 
  </code></pre>
  
  <p>or should I do</p>
  
  <pre><code>var a = function(cmd, options){
       var objList = [search , demand];
  
      if(!(options in objList)){
        console.warn('Not an Allowed option in the options Property');
        }
   }; 
  </code></pre>
  
  <p>Basically what I want to do is set that <code>search</code> and <code>demand</code> are allowed options in the options Property so later than can do</p>
  
  <pre><code> a('cmd',{
    search:'',
    demand:function() {
     alert('Hello');
      },
    //warn that the next option is not allowed
    quote: function() {
      alert('quote of user');
     }
    });
  </code></pre>
  
  <p>If you are having trouble understanding what I am asking please ask and I will do my best to explain a bit more.</p>
  
  <p>maybe writing it like so would be better?</p>
  
  <pre><code>var a = function(cmd, options){
    options = {
     theme: function(color) {
      $('body').css('backgroundColor',color);
      },
     color:''
     };
   };
  
  a('cmd',{
    theme:'#000'//though this is not working?
   });
  </code></pre>