object-to-formdata
Advanced tools
Comparing version 1.6.4 to 2.1.0
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20382
13
8
297
2
1