lib/utils.js
function addDeprecatedGetters(obj, props) {
  var proto = obj.prototype;
  var i, l, prop, getter;
  for (i = 0, l = props.length; i < l; i++) {
    prop = props[i];
    getter = 'get' + capitalize(prop);
    proto[getter] = util.deprecate(
      createGetter(prop),
      'use `.' + prop + '` instead of `.' + getter + '()`'
    );
  }

  function createGetter(prop) {
    return function () {
      var delegate = this[prop];
      return typeof delegate == 'function' ?
        delegate.apply(this, arguments) :
        delegate;
    };
  }
}
function addDeprecatedGetters(obj, props) {
  var proto = obj.prototype;
  var i, l, prop, getter;
  for (i = 0, l = props.length; i < l; i++) {
    prop = props[i];
    getter = 'get' + capitalize(prop);
    proto[getter] = util.deprecate(
      createGetter(prop),
      'use `.' + prop + '` instead of `.' + getter + '()`'
    );
  }

  function createGetter(prop) {
    return function () {
      var delegate = this[prop];
      return typeof delegate == 'function' ?
        delegate.apply(this, arguments) :
        delegate;
    };
  }
}
function addDeprecatedGetters ( obj , props ) { var proto = obj . prototype ; var i , l , prop , getter ; for ( i = 0 , l = props . length ; i < l ; i ++ ) { prop = props [ i ] ; getter = 'get' + capitalize ( prop ) ; proto [ getter ] = util . deprecate ( createGetter ( prop ) , 'use `.' + prop + '` instead of `.' + getter + '()`' ) ; } function createGetter ( prop ) { return function ( ) { var delegate = this [ prop ] ; return typeof delegate == 'function' ? delegate . apply ( this , arguments ) : delegate ; } ; } }
Batch-deprecate "getters" from an object's prototype.
Batch - deprecate getters from an object s prototype .