code: function createAdder(direction, name) {
          return function (val, period) {
              var dur, tmp;
              //invert the arguments, but complain about it
              if (period !== null && !isNaN(+period)) {
                  deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
                  tmp = val; val = period; period = tmp;
              }
  
              val = typeof val === 'string' ? +val : val;
              dur = moment.duration(val, period);
              addOrSubtractDurationFromMoment(this, dur, direction);
              return this;
          };
      }
docs: TODO: remove 'name' arg after deprecation is removed