<commit_before>export interface INgUploaderOptions {
  url: string;
  cors?: boolean;
  withCredentials?: boolean;
  multiple?: boolean;
  maxUploads?: number;
  data?: any;
  autoUpload?: boolean;
  multipart?: any;
  method?: 'POST' | 'GET';
  customHeaders?: any;
  encodeHeaders?: boolean;
  authTokenPrefix?: string;
  authToken?: string;
  fieldName?: string;
  fieldReset?: boolean;
  previewUrl?: string;
  calculateSpeed?: boolean;
  filterExtensions?: boolean;
  allowedExtensions?: string[];
}

export class NgUploaderOptions implements INgUploaderOptions {
  url: string;
  cors?: boolean;
  withCredentials?: boolean;
  multiple?: boolean;
  maxUploads?: number;
  data?: any;
  autoUpload?: boolean;
  multipart?: any;
  method?: 'POST' | 'GET';
  customHeaders?: any;
  encodeHeaders?: boolean;
  authTokenPrefix?: string;
  authToken?: string;
  fieldName?: string;
  fieldReset?: boolean;
  previewUrl?: string;
  calculateSpeed?: boolean;
  filterExtensions?: boolean;
  allowedExtensions?: string[];

  constructor(obj: INgUploaderOptions) {
    this.url = obj.url != null ? obj.url : '';
    this.cors = obj.cors != null ? obj.cors : true;
    this.withCredentials = obj.withCredentials != null ? obj.withCredentials : this.withCredentials;
    this.multiple = obj.multiple != null ? obj.multiple : true;
    this.maxUploads = obj.maxUploads != null ? obj.maxUploads : 10;
    this.data = obj.data != null ? obj.data : {};
    this.autoUpload = obj.autoUpload != null ? obj.autoUpload : true;
    this.multipart = obj.multipart != null ? obj.multipart : false;
    this.method = obj.method != null ? obj.method : 'POST';
    this.customHeaders = obj.customHeaders != null ? obj.customHeaders : { };
    this.encodeHeaders = obj.encodeHeaders != null ? obj.encodeHeaders : false;
    this.authTokenPrefix = obj.authTokenPrefix != null ? obj.authTokenPrefix : 'Bearer';
    this.authToken = obj.authToken != null ? obj.authToken : null;<commit_msg>Extended options to methods PUT and PATCH. (#171)<commit_after>export interface INgUploaderOptions {
  url: string;
  cors?: boolean;
  withCredentials?: boolean;
  multiple?: boolean;
  maxUploads?: number;
  data?: any;
  autoUpload?: boolean;
  multipart?: any;
  method?: 'POST' | 'GET' | 'PATCH' | 'PUT';
  customHeaders?: any;
  encodeHeaders?: boolean;
  authTokenPrefix?: string;
  authToken?: string;
  fieldName?: string;
  fieldReset?: boolean;
  previewUrl?: string;
  calculateSpeed?: boolean;
  filterExtensions?: boolean;
  allowedExtensions?: string[];
}

export class NgUploaderOptions implements INgUploaderOptions {
  url: string;
  cors?: boolean;
  withCredentials?: boolean;
  multiple?: boolean;
  maxUploads?: number;
  data?: any;
  autoUpload?: boolean;
  multipart?: any;
  method?: 'POST' | 'GET' | 'PATCH' | 'PUT';
  customHeaders?: any;
  encodeHeaders?: boolean;
  authTokenPrefix?: string;
  authToken?: string;
  fieldName?: string;
  fieldReset?: boolean;
  previewUrl?: string;
  calculateSpeed?: boolean;
  filterExtensions?: boolean;
  allowedExtensions?: string[];

  constructor(obj: INgUploaderOptions) {
    this.url = obj.url != null ? obj.url : '';
    this.cors = obj.cors != null ? obj.cors : true;
    this.withCredentials = obj.withCredentials != null ? obj.withCredentials : this.withCredentials;
    this.multiple = obj.multiple != null ? obj.multiple : true;
    this.maxUploads = obj.maxUploads != null ? obj.maxUploads : 10;
    this.data = obj.data != null ? obj.data : {};
    this.autoUpload = obj.autoUpload != null ? obj.autoUpload : true;
    this.multipart = obj.multipart != null ? obj.multipart : false;
    this.method = obj.method != null ? obj.method : 'POST';
    this.customHeaders = obj.customHeaders != null ? obj.customHeaders : { };
    this.encodeHeaders = obj.encodeHeaders != null ? obj.encodeHeaders : false;
    this.authTokenPrefix = obj.authTokenPrefix != null ? obj.authTokenPrefix : 'Bearer';
    this.authToken = obj.authToken != null ? obj.authToken : null;
{'fraction_non_alphanumeric': 0.13586413586413587, 'fraction_numerical': 0.0017482517482517483, 'mean_word_length': 4.114942528735632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7046112', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1226, 'n_words': 310}