src/index.js
/**
   * Attach a form data object
   * @param {string} name Name of the form attachment
   * @param {string|Object|Buffer} data Data for the attachment
   * @param {string} [filename] Optional filename if form attachment name needs to be overridden
   * @returns {Snekfetch} This request
   */
Attach a form data object
@param {string} name Name of the form attachment
@param {string|Object|Buffer} data Data for the attachment
@param {string} [filename] Optional filename if form attachment name needs to be overridden
@returns {Snekfetch} This request
Attach a form data object @param { string } name Name of the form attachment @param { string|Object|Buffer } data Data for the attachment @param { string } [ filename ] Optional filename if form attachment name needs to be overridden @returns { Snekfetch } This request
attach(...args) {
    const form = this.options.data instanceof transport.FormData ?
      this.options.data : this.options.data = new transport.FormData();
    if (typeof args[0] === 'object') {
      for (const [k, v] of Object.entries(args[0])) {
        this.attach(k, v);
      }
    } else {
      form.append(...args);
    }
    return this;
  }
attach ( ... args ) { const form = this . options . data instanceof transport . FormData ? this . options . data : this . options . data = new transport . FormData ( ) ; if ( typeof args [ 0 ] === 'object' ) { for ( const [ k , v ] of Object . entries ( args [ 0 ] ) ) { this . attach ( k , v ) ; } } else { form . append ( ... args ) ; } return this ; }
Attach a form data object
 @param {string} name Name of the form attachment
 @param {string|Object|Buffer} data Data for the attachment
 @param {string} [filename] Optional filename if form attachment name needs to be overridden
 @returns {Snekfetch} This request
Attach a form data object @param { string } name Name of the form attachment @param { string|Object|Buffer } data Data for the attachment @param { string } [ filename ] Optional filename if form attachment name needs to be overridden @returns { Snekfetch } This request