code: function when(properties, callback, thisArg){
  
      // Make sure the default `this` becomes
      // the object you called `.on` on.
      thisArg = thisArg || this;
  
      // Handle either an array or a single string.
      properties = (properties instanceof Array) ? properties : [properties];
  
      // This function will trigger the callback to be invoked.
      var listener = debounce(function (){
        var args = properties.map(function(property){
          return values[property];
        });
        if(allAreDefined(args)){
          callback.apply(thisArg, args);
        }
      });
  
      // Trigger the callback once for initialization.
      listener();
  
      // Trigger the callback whenever specified properties change.
      properties.forEach(function(property){
        on(property, listener);
      });
  
      // Return this function so it can be removed later with `model.cancel(listener)`.
      return listener;
    }
docs: The functional reactive "when" operator.  * `properties` An array of property names (can also be a single property string). * `callback` A callback function that is called: * with property values as arguments, ordered corresponding to the properties array, * only if all specified properties have values, * once for initialization, * whenever one or more specified properties change, * on the next tick of the JavaScript event loop after properties change, * only once as a result of one or more synchronous changes to dependency properties.