Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-to-formdata

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-to-formdata - npm Package Compare versions

Comparing version 1.6.4 to 2.1.0

.eslintignore

24

index.d.ts

@@ -1,15 +0,11 @@

declare function isUndefined(value: any): boolean;
declare function isNull(value: any): boolean;
declare function isObject(value: any): boolean;
declare function isArray(value: any): boolean;
declare function isDate(value: any): boolean;
declare function isBlob(value: any): boolean;
declare function isFile(value: any): boolean;
declare function isFormData(value: any): boolean;
declare type ParamType = undefined | null;
interface ICfg {
export = objectToFormData;
declare function objectToFormData(
obj: any,
cfg?: {
indices?: boolean;
nulls?: boolean;
}
declare function objectToFormData(obj: any, cfg?: ICfg | FormData | ParamType, fd?: FormData, pre?: FormData | string): FormData;
declare module 'object-to-formdata';
nullsAsUndefined?: boolean;
},
fd?: FormData,
pre?: string
): FormData;
{
"name": "object-to-formdata",
"version": "1.6.4",
"description": "A convenient JavaScript function that converts an object to a FormData instance",
"main": "index.js",
"scripts": {
"lint": "standard --fix **/*.js",
"test": "jest --coverage"
},
"types": "index.d.ts",
"version": "2.1.0",
"repository": "therealparmesh/object-to-formdata",
"license": "MIT",
"keywords": [

@@ -18,14 +12,47 @@ "object-to-formdata",

"form",
"submit",
"vanilla"
"submit"
],
"author": "Parmesh Krishen",
"license": "MIT",
"main": "dist",
"types": "index.d.ts",
"scripts": {
"lint": "standard '**/*.js'",
"test": "jest --coverage",
"build": "rollup --config",
"prepublishOnly": "run-s lint test build"
},
"devDependencies": {
"jest": "^23.6.0",
"standard": "^12.0.1"
"@babel/core": "7.5.5",
"@babel/preset-env": "7.5.5",
"jest": "24.9.0",
"npm-run-all": "4.1.5",
"rollup": "1.20.3",
"rollup-plugin-babel": "4.3.3",
"rollup-plugin-terser": "5.1.1",
"standard": "14.1.0"
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": true
}
}
]
]
},
"browserslist": [
"last 2 chrome versions",
"last 2 safari versions",
"last 2 edge versions",
"last 2 firefox versions",
"last 2 ios versions",
"last 2 chromeandroid versions",
"ie 11"
],
"standard": {
"env": [
"browser",
"node",
"jest"

@@ -32,0 +59,0 @@ ]

@@ -9,3 +9,3 @@ # object-to-formdata

```js
const objectToFormData = require('object-to-formdata');
import objectToFormData from 'object-to-formdata';

@@ -21,3 +21,3 @@ const object = {

/**
* whether or not to include array indices in FormData keys
* include array indices in FormData keys
* defaults to false

@@ -28,6 +28,6 @@ */

/**
* whether or not to include null values as empty strings in FormData instance
* defaults to true
* treat null values like undefined values and ignore them
* defaults to false
*/
nulls: true
nullsAsUndefined: false,
};

@@ -34,0 +34,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc