lib/builder.js
function fromJS(obj) {
    Object.keys(obj).forEach(function (key) {
      var val = obj[key];
      if (typeof this[key] !== 'function') {
        debug('Knex Error: unknown key ' + key);
      }
      if (Array.isArray(val)) {
        this[key].apply(this, val);
      } else {
        this[key](val);
      }
    }, this);
    return this;
  }
function fromJS(obj) {
    Object.keys(obj).forEach(function (key) {
      var val = obj[key];
      if (typeof this[key] !== 'function') {
        debug('Knex Error: unknown key ' + key);
      }
      if (Array.isArray(val)) {
        this[key].apply(this, val);
      } else {
        this[key](val);
      }
    }, this);
    return this;
  }
function fromJS ( obj ) { Object . keys ( obj ) . forEach ( function ( key ) { var val = obj [ key ] ; if ( typeof this [ key ] !== 'function' ) { debug ( 'Knex Error: unknown key ' + key ) ; } if ( Array . isArray ( val ) ) { this [ key ] . apply ( this , val ) ; } else { this [ key ] ( val ) ; } } , this ) ; return this ; }
Takes a JS object of methods to call and calls them
Takes a JS object of methods to call and calls them