Numerous Problems Multiplied

    @foqum/object-to-formdata

    0.0.1 • Public • Published

    object-to-formdata

    A convenient JavaScript function that converts an object to a FormData instance

    const objectToFormData = require('object-to-formdata')
     
    const object = {
      /**
       * key-value mapping
       * values can be primitives or objects
       */
    }
     
    const options = {
      /**
       * whether or not to include array indices in FormData keys
       * defaults to false
       */
      indices: false
    }
     
    const formData = objectToFormData(
      object,
      options, // optional
      existingFormData, // optional
      keyPrefix // optional
    )
     
    console.log(formData)

    Install

    npm i @foqum/object-to-formdata

    DownloadsWeekly Downloads

    13

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    12.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar