message: paramToString minification
diff: @@ -46,6 +46,21 @@ export interface RequestOptions {
  responseType?: string;
  }
  +/**
  + * Returns a string representation for an actual parameter.
  + * @param param The actual parameter.
  + * @returns The string representation of <code>param</code>.
  + */
  +export function paramToString(param: any): string {
  + if (param === undefined || param === null) {
  + return '';
  + }
  + if (param instanceof Date) {
  + return param.toJSON();
  + }
  + return param.toString();
  +}
  +
  export class AlfrescoApiClient implements ee.Emitter {
  on: ee.EmitterMethod;
  @@ -92,21 +107,6 @@ export class AlfrescoApiClient implements ee.Emitter {
  EventEmitter(this);
  }
  - /**
  - * Returns a string representation for an actual parameter.
  - * @param param The actual parameter.
  - * @returns The string representation of <code>param</code>.
  - */
  - paramToString(param: any): string {
  - if (param === undefined || param === null) {
  - return '';
  - }
  - if (param instanceof Date) {
  - return param.toJSON();
  - }
  - return param.toString();
  - }
  -
  /**
  * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
  * NOTE: query parameters are not handled here.
  @@ -119,11 +119,11 @@ export class AlfrescoApiClient implements ee.Emitter {
  path = '/' + path;
  }
  let url = this.basePath + path;
  - const _this = this;
  +
  url = url.replace(/\{([\w-]+)\}/g, function (fullMatch, key) {
  let value;
  if (pathParams.hasOwnProperty(key)) {
  - value = _this.paramToString(pathParams[key]);
  + value = paramToString(pathParams[key]);
  } else {
  value = fullMatch;
  }
  @@ -206,7 +206,7 @@ export class AlfrescoApiClient implements ee.Emitter {
  if (this.isFileParam(value) || Array.isArray(value)) {
  newParams[key] = value;
  } else {
  - newParams[key] = this.paramToString(value);
  + newParams[key] = paramToString(value);
  }
  }
  }
  @@ -228,16 +228,16 @@ export class AlfrescoApiClient implements ee.Emitter {
  switch (collectionFormat) {
  case 'csv':
  - return param.map(this.paramToString).join(',');
  + return param.map(paramToString).join(',');
  case 'ssv':
  - return param.map(this.paramToString).join(' ');
  + return param.map(paramToString).join(' ');
  case 'tsv':
  - return param.map(this.paramToString).join('\t');
  + return param.map(paramToString).join('\t');
  case 'pipes':
  - return param.map(this.paramToString).join('|');
  + return param.map(paramToString).join('|');
  case 'multi':
  // return the array directly as SuperAgent will handle it as expected
  - return param.map(this.paramToString);
  + return param.map(paramToString);
  default:
  throw new Error('Unknown collection format: ' + collectionFormat);
  }
  @@ -612,11 +612,11 @@ export class AlfrescoApiClient implements ee.Emitter {
  path = '/' + path;
  }
  let url = basePath + path;
  - const _this = this;
  +
  url = url.replace(/\{([\w-]+)\}/g, function (fullMatch, key) {
  let value;
  if (pathParams.hasOwnProperty(key)) {
  - value = _this.paramToString(pathParams[key]);
  + value = paramToString(pathParams[key]);
  } else {
  value = fullMatch;
  }
  