{
  "_id": "nested-formdata",
  "maintainers": [
    {
      "name": "mh.alijany",
      "email": "mh.alijany@gmail.com"
    }
  ],
  "license": "MIT",
  "dist-tags": {
    "latest": "1.1.1"
  },
  "versions": {
    "1.0.0": {
      "name": "nested-formdata",
      "version": "1.0.0",
      "keywords": [
        "nested-formdata",
        "formdata",
        "object-to-formdata"
      ],
      "author": {
        "name": "Mohammad Hosein Alijany"
      },
      "license": "ISC",
      "_id": "nested-formdata@1.0.0",
      "maintainers": [
        {
          "name": "mh.alijany",
          "email": "mh.alijany@gmail.com"
        }
      ],
      "homepage": "https://github.com/alijany/nested-formdata#readme",
      "bugs": {
        "url": "https://github.com/alijany/nested-formdata/issues"
      },
      "dist": {
        "shasum": "0001d55941c14f6451481a257b3593e6684f9927",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/nested-formdata/-/nested-formdata-1.0.0.tgz",
        "fileCount": 11,
        "integrity": "sha512-68PQVi9kYxdH83hjAW/y0pHgYZxmVbY/jCvIB2yleXZO8wqKOu9Uu1AiJOKuSDp8s3V+r0MnSSD5xS+UOk+cBg==",
        "signatures": [
          {
            "sig": "MEUCIQCLYD2TedUhFohzhxNn+7C0Yz4AfeTappCr+tGZNmS2cQIgbizy4XUwZBRcoyqD3qLZKhtPUZDQJX34TzpvNcF6pu4=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 12188
      },
      "main": "./dist/nested-formdata.cjs",
      "type": "module",
      "unpkg": "./dist/nested-formdata.umd.js",
      "module": "./dist/nested-formdata.module.js",
      "source": "./script.ts",
      "exports": {
        "default": "./dist/nested-formdata.modern.js",
        "require": "./dist/nested-formdata.cjs"
      },
      "gitHead": "376cc6bf5c7b8ae43ac284ef56235fb1fef36a8e",
      "scripts": {
        "dev": "microbundle watch",
        "build": "microbundle"
      },
      "_npmUser": {
        "name": "mh.alijany",
        "email": "mh.alijany@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/alijany/nested-formdata.git",
        "type": "git"
      },
      "_npmVersion": "8.19.4",
      "description": "This is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in multipart/form-data format. This utility is built with TypeScript and Lodash.",
      "directories": {},
      "_nodeVersion": "16.20.2",
      "dependencies": {
        "lodash": "^4.17.21"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "eslint": "^8.42.0",
        "microbundle": "^0.15.1",
        "@types/lodash": "^4.14.202",
        "eslint-config-prettier": "^8.8.0",
        "eslint-plugin-prettier": "^4.2.1",
        "@typescript-eslint/parser": "^5.59.11",
        "@typescript-eslint/eslint-plugin": "^5.59.11"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/nested-formdata_1.0.0_1701599392216_0.21878199413460298",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.0.1": {
      "name": "nested-formdata",
      "version": "1.0.1",
      "keywords": [
        "nested-formdata",
        "formdata",
        "object-to-formdata"
      ],
      "author": {
        "name": "Mohammad Hosein Alijany"
      },
      "license": "ISC",
      "_id": "nested-formdata@1.0.1",
      "maintainers": [
        {
          "name": "mh.alijany",
          "email": "mh.alijany@gmail.com"
        }
      ],
      "homepage": "https://github.com/alijany/nested-formdata#readme",
      "bugs": {
        "url": "https://github.com/alijany/nested-formdata/issues"
      },
      "dist": {
        "shasum": "4ad13c9037683485096fd4122cb7ab2d7fb26667",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/nested-formdata/-/nested-formdata-1.0.1.tgz",
        "fileCount": 11,
        "integrity": "sha512-6gM+2ttfR7FV95CxSVsmHBmZJdzk8DiE0Eh74hQL8GKn4iUDgHcahzgbnuJSZEKAtXx4R8i12+xDW/qjerlIIw==",
        "signatures": [
          {
            "sig": "MEUCID1eKxJ0IK0SXzVXzabIKspFbMvnjhGMhpTco5OGSMXPAiEA1XAGN+pQyq0jwKDv90/47N5WWIl37cykA+tGlqN5YzA=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 12393
      },
      "main": "./dist/nested-formdata.cjs",
      "type": "module",
      "unpkg": "./dist/nested-formdata.umd.js",
      "module": "./dist/nested-formdata.module.js",
      "source": "./script.ts",
      "exports": {
        "default": "./dist/nested-formdata.modern.js",
        "require": "./dist/nested-formdata.cjs"
      },
      "gitHead": "a7b71afbb74d117fc3dba61c7ced2219dadc52ef",
      "scripts": {
        "dev": "microbundle watch",
        "build": "microbundle"
      },
      "_npmUser": {
        "name": "mh.alijany",
        "email": "mh.alijany@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/alijany/nested-formdata.git",
        "type": "git"
      },
      "_npmVersion": "8.19.4",
      "description": "This is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in multipart/form-data format. This utility is built with TypeScript and Lodash.",
      "directories": {},
      "_nodeVersion": "16.20.2",
      "dependencies": {
        "lodash": "^4.17.21"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "eslint": "^8.42.0",
        "microbundle": "^0.15.1",
        "@types/lodash": "^4.14.202",
        "eslint-config-prettier": "^8.8.0",
        "eslint-plugin-prettier": "^4.2.1",
        "@typescript-eslint/parser": "^5.59.11",
        "@typescript-eslint/eslint-plugin": "^5.59.11"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/nested-formdata_1.0.1_1701600147477_0.7301386676095705",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.0.2": {
      "name": "nested-formdata",
      "version": "1.0.2",
      "keywords": [
        "nested-formdata",
        "formdata",
        "object-to-formdata"
      ],
      "author": {
        "name": "Mohammad Hosein Alijany"
      },
      "license": "ISC",
      "_id": "nested-formdata@1.0.2",
      "maintainers": [
        {
          "name": "mh.alijany",
          "email": "mh.alijany@gmail.com"
        }
      ],
      "homepage": "https://github.com/alijany/nested-formdata#readme",
      "bugs": {
        "url": "https://github.com/alijany/nested-formdata/issues"
      },
      "dist": {
        "shasum": "03cf79cce68c39b13e110356429897731a029da4",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/nested-formdata/-/nested-formdata-1.0.2.tgz",
        "fileCount": 11,
        "integrity": "sha512-vi5P/97N0bUDY/+2DqMG3YF00j67HhPAPGTwaqWd9oMQAUO0hXJGpsTiew+C/mSvlaqmN+G3cPXe4Q51P6SN9g==",
        "signatures": [
          {
            "sig": "MEUCIHPSn7rfho3TINfHmiFnWL33Qnmf9JnTvUVi4Bb7ibBOAiEAgzDzjkz+FnkEEekz4lV4q2y1apijsu/4rNdAewYK+RU=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 12426
      },
      "main": "./dist/nested-formdata.cjs",
      "type": "module",
      "types": "./dist/script.d.ts",
      "unpkg": "./dist/nested-formdata.umd.js",
      "module": "./dist/nested-formdata.module.js",
      "source": "./script.ts",
      "exports": {
        "default": "./dist/nested-formdata.modern.js",
        "require": "./dist/nested-formdata.cjs"
      },
      "gitHead": "be045fd21f53c90f392f27e0f3636da2ac011074",
      "scripts": {
        "dev": "microbundle watch",
        "build": "microbundle"
      },
      "_npmUser": {
        "name": "mh.alijany",
        "email": "mh.alijany@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/alijany/nested-formdata.git",
        "type": "git"
      },
      "_npmVersion": "8.19.4",
      "description": "This is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in multipart/form-data format. This utility is built with TypeScript and Lodash.",
      "directories": {},
      "_nodeVersion": "16.20.2",
      "dependencies": {
        "lodash": "^4.17.21"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "eslint": "^8.42.0",
        "microbundle": "^0.15.1",
        "@types/lodash": "^4.14.202",
        "eslint-config-prettier": "^8.8.0",
        "eslint-plugin-prettier": "^4.2.1",
        "@typescript-eslint/parser": "^5.59.11",
        "@typescript-eslint/eslint-plugin": "^5.59.11"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/nested-formdata_1.0.2_1701600571156_0.5351481025550315",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.1.0": {
      "name": "nested-formdata",
      "version": "1.1.0",
      "author": {
        "name": "MH.Alijany"
      },
      "license": "MIT",
      "_id": "nested-formdata@1.1.0",
      "maintainers": [
        {
          "name": "mh.alijany",
          "email": "mh.alijany@gmail.com"
        }
      ],
      "dist": {
        "shasum": "7ea488588ba54c0b765ebe5b1f6c67def3ee80d8",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/nested-formdata/-/nested-formdata-1.1.0.tgz",
        "fileCount": 12,
        "integrity": "sha512-mhBgTQGAQ5U1jHULAUG/V0RNksaBNEfnWlcLo7SeQlgw4B5mjFkmpoNNJMSleQFNFPMSY2A8dI07SPmpUPWvJw==",
        "signatures": [
          {
            "sig": "MEUCIFa7HWc9DgEqx/gqbVCdQcrzLKhy8xEjJH2Wa8J5MlExAiEAsEwoiPBP3dJcbaUOpaeD1tzUeU+7WkSiMp0WMnREyWI=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 13998
      },
      "main": "dist/index.js",
      "husky": {
        "hooks": {
          "pre-commit": "tsdx lint"
        }
      },
      "module": "dist/nested-formdata.esm.js",
      "engines": {
        "node": ">=10"
      },
      "gitHead": "2d4b3288fa6bc21ed1ab7831653ed1d58ed1d807",
      "scripts": {
        "lint": "tsdx lint",
        "size": "size-limit",
        "test": "tsdx test",
        "build": "tsdx build --transpileOnly",
        "start": "tsdx watch",
        "analyze": "size-limit --why",
        "prepare": "tsdx build --transpileOnly"
      },
      "typings": "dist/index.d.ts",
      "_npmUser": {
        "name": "mh.alijany",
        "email": "mh.alijany@gmail.com"
      },
      "prettier": {
        "semi": true,
        "printWidth": 80,
        "singleQuote": true,
        "trailingComma": "es5"
      },
      "size-limit": [
        {
          "path": "dist/nested-formdata.cjs.production.min.js",
          "limit": "10 KB"
        },
        {
          "path": "dist/nested-formdata.esm.js",
          "limit": "10 KB"
        }
      ],
      "_npmVersion": "8.19.4",
      "description": "This is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in `multipart/form-data` format. This utility is built with TypeScript and Lodash.",
      "directories": {},
      "_nodeVersion": "16.20.2",
      "dependencies": {
        "lodash": "^4.17.21"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "tsdx": "^0.14.1",
        "husky": "^8.0.3",
        "tslib": "^2.6.2",
        "eslint": "^8.42.0",
        "size-limit": "^11.0.1",
        "typescript": "^5.3.3",
        "@types/lodash": "^4.14.202",
        "eslint-config-prettier": "^8.8.0",
        "eslint-plugin-prettier": "^4.2.1",
        "@typescript-eslint/parser": "^5.59.11",
        "@size-limit/preset-small-lib": "^11.0.1",
        "@typescript-eslint/eslint-plugin": "^5.59.11"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/nested-formdata_1.1.0_1702887962410_0.7961906035655231",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.1.1": {
      "version": "1.1.1",
      "license": "MIT",
      "main": "dist/index.js",
      "typings": "dist/index.d.ts",
      "engines": {
        "node": ">=10"
      },
      "scripts": {
        "start": "tsdx watch",
        "build": "tsdx build --transpileOnly",
        "test": "tsdx test",
        "lint": "tsdx lint",
        "prepare": "tsdx build --transpileOnly",
        "size": "size-limit",
        "analyze": "size-limit --why"
      },
      "husky": {
        "hooks": {
          "pre-commit": "tsdx lint"
        }
      },
      "prettier": {
        "printWidth": 80,
        "semi": true,
        "singleQuote": true,
        "trailingComma": "es5"
      },
      "name": "nested-formdata",
      "author": {
        "name": "MH.Alijany"
      },
      "module": "dist/nested-formdata.esm.js",
      "size-limit": [
        {
          "path": "dist/nested-formdata.cjs.production.min.js",
          "limit": "10 KB"
        },
        {
          "path": "dist/nested-formdata.esm.js",
          "limit": "10 KB"
        }
      ],
      "devDependencies": {
        "@size-limit/preset-small-lib": "^11.0.1",
        "@types/lodash": "^4.14.202",
        "@typescript-eslint/eslint-plugin": "^5.59.11",
        "@typescript-eslint/parser": "^5.59.11",
        "eslint": "^8.42.0",
        "eslint-config-prettier": "^8.8.0",
        "eslint-plugin-prettier": "^4.2.1",
        "husky": "^8.0.3",
        "size-limit": "^11.0.1",
        "tsdx": "^0.14.1",
        "tslib": "^2.6.2",
        "typescript": "^5.3.3"
      },
      "dependencies": {},
      "gitHead": "fd4fcd56e0924057d9e47ca993286aba5dd50b8b",
      "description": "This is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in `multipart/form-data` format. This utility is built with TypeScript and Lodash.",
      "_id": "nested-formdata@1.1.1",
      "_nodeVersion": "16.20.2",
      "_npmVersion": "8.19.4",
      "dist": {
        "integrity": "sha512-dfkpfcs7SRZ0F1hc5Eo8OCKN7SlAmK1YtJuktsgY316bqkpM2+nJxaKD86GRcBiwUa4xJfh1B0DJj4V9fMdtKg==",
        "shasum": "94657cf82d9a1f1f3f791d3bdd8340c51298e465",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/nested-formdata/-/nested-formdata-1.1.1.tgz",
        "fileCount": 12,
        "unpackedSize": 14337,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIDPQLUBuNgN9lTS9VOe9k0gQ3eOs0yqNHeNFZdvMexKZAiANzIM1yJ4ssVBoNx0g+72kf5OVDLEkqN/WicNuNwE36g=="
          }
        ]
      },
      "_npmUser": {
        "name": "mh.alijany",
        "email": "mh.alijany@gmail.com"
      },
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/nested-formdata_1.1.1_1719686446116_0.9887236696930539"
      },
      "_hasShrinkwrap": false
    }
  },
  "author": {
    "name": "MH.Alijany"
  },
  "_rev": "4-d0a3da900301dd3558875da83548535b",
  "name": "nested-formdata",
  "description": "This is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in `multipart/form-data` format. This utility is built with TypeScript and Lodash.",
  "time": {
    "created": "2023-12-03T10:29:52.215Z",
    "modified": "2026-05-30T21:10:20.108Z",
    "1.0.0": "2023-12-03T10:29:52.349Z",
    "1.0.1": "2023-12-03T10:42:27.689Z",
    "1.0.2": "2023-12-03T10:49:31.362Z",
    "1.1.0": "2023-12-18T08:26:02.603Z",
    "1.1.1": "2024-06-29T18:40:46.259Z"
  },
  "readme": "# Object to FormData Converter\r\n\r\nThis is a JavaScript utility function that converts JavaScript nested objects into FormData. It's beneficial when you need to send your data to the server in `multipart/form-data` format. This utility is built with TypeScript and Lodash.\r\n\r\n## Installation\r\n\r\nTo install this package, use the following command:\r\n\r\n```bash\r\nnpm install nested-formdata\r\n```\r\n\r\n## Usage\r\n\r\nFirst, import the function into your JavaScript or TypeScript file:\r\n\r\n```ts\r\nimport { objectToFormData } from 'nested-formdata';\r\n```\r\n\r\nYou can then use the objectToFormData function to convert an objects or array of objects to FormData:\r\n\r\n```ts\r\nconst data = {\r\n  name: 'John Doe',\r\n  age: 30,\r\n  photo: File // This can be an instance of File Or array of Files\r\n};\r\n\r\nconst formData = objectToFormData(data);\r\n```\r\n\r\n\r\nYou can also handle nested objects:\r\n\r\n```ts\r\nconst data = {\r\n  name: 'John Doe',\r\n  age: 30,\r\n  address: {\r\n    city: 'New York',\r\n    state: 'NY'\r\n    array: [1, 2, 3],\r\n    image: File,\r\n  }\r\n};\r\n\r\nconst formData = objectToFormData(data);\r\n```\r\n\r\n## API\r\n\r\n`objectToFormData(obj, form, namespace)`\r\n\r\n### Parameters\r\n\r\n- `obj` (Object): The object to convert.\r\n- `form` (FormData, optional): Existing FormData to use.\r\n- `namespace` (String, optional): Namespace to prefix keys with.\r\n\r\n### Returns\r\n\r\n- (FormData): The resulting FormData object.\r\n\r\n## Contributing\r\n\r\nPull requests are welcome. Please make sure to update tests as appropriate.\r\n\r\n## License\r\nThis project is licensed under the MIT License.\r\n\r\n",
  "readmeFilename": "README.md"
}