lib/base.js
function (key, fn) {
    if (typeof key === 'function') {
      fn = key;
      key = null;
    }
    if (typeof fn !== 'function') {
      fn = this.pickOption('renameKey');
    }
    if (typeof fn !== 'function') {
      fn = utils.identity;
    }

    this.options.renameKey = fn;
    if (arguments.length === 2) {
      return fn(key);
    }
    if (typeof key === 'string') {
      return fn(key);
    }
    return fn;
  }
function (key, fn) {
    if (typeof key === 'function') {
      fn = key;
      key = null;
    }
    if (typeof fn !== 'function') {
      fn = this.pickOption('renameKey');
    }
    if (typeof fn !== 'function') {
      fn = utils.identity;
    }

    this.options.renameKey = fn;
    if (arguments.length === 2) {
      return fn(key);
    }
    if (typeof key === 'string') {
      return fn(key);
    }
    return fn;
  }
function ( key , fn ) { if ( typeof key === 'function' ) { fn = key ; key = null ; } if ( typeof fn !== 'function' ) { fn = this . pickOption ( 'renameKey' ) ; } if ( typeof fn !== 'function' ) { fn = utils . identity ; } this . options . renameKey = fn ; if ( arguments . length === 2 ) { return fn ( key ) ; } if ( typeof key === 'string' ) { return fn ( key ) ; } return fn ; }
Resolves the renaming function to use on `view` keys.
Resolves the renaming function to use on view keys .