@octetstream/object-to-form-data
Advanced tools
Comparing version 0.4.0 to 1.0.0
@@ -1,14 +0,4 @@ | ||
try { | ||
module.exports = require("formdata-node").default | ||
} catch (err) { | ||
if (err.code !== "MODULE_NOT_FOUND") { | ||
throw err | ||
} | ||
throw new Error( | ||
"Seems like you haven't installed \"formdata-node\" module. " + | ||
"This one required for Node.js.\nPlease, install this module " + | ||
"manually: npm i -S formdata-node" | ||
) | ||
} | ||
// Hello the brave node_modules wanderer! | ||
// Note that formdata-node is required for Node.js | ||
// So, if you got an error on line below, just install it manually :) | ||
module.exports = require("formdata-node").default |
{ | ||
"name": "@octetstream/object-to-form-data", | ||
"version": "0.4.0", | ||
"version": "1.0.0", | ||
"description": "Serialize given object/collection to a FormData.", | ||
@@ -16,3 +16,10 @@ "repository": "https://github.com/octet-stream/object-to-form-data", | ||
}, | ||
"size-limit": [ | ||
{ | ||
"path": "serialize.js", | ||
"limit": "597 B" | ||
} | ||
], | ||
"scripts": { | ||
"limit": "node_modules/.bin/size-limit", | ||
"lint": "node_modules/.bin/eslint mock.js serialize.js test.js", | ||
@@ -23,3 +30,3 @@ "test": "node_modules/.bin/ava test.js", | ||
"ci": "yarn coverage && node_modules/.bin/nyc report --reporter=lcov yarn test && node_modules/.bin/codecov", | ||
"precommit": "yarn lint", | ||
"precommit": "yarn lint && yarn limit", | ||
"prepush": "yarn report" | ||
@@ -30,16 +37,14 @@ }, | ||
"ava": "0.25.0", | ||
"codecov": "3.0.0", | ||
"eslint": "4.17.0", | ||
"eslint-plugin-ava": "4.5.0", | ||
"formdata-node": "0.3.3", | ||
"codecov": "3.0.2", | ||
"eslint": "4.19.1", | ||
"eslint-plugin-ava": "4.5.1", | ||
"formdata-node": "1.0.1", | ||
"husky": "0.14.3", | ||
"nyc": "11.4.1", | ||
"proxyquire": "1.8.0" | ||
"nyc": "11.8.0", | ||
"proxyquire": "2.0.1", | ||
"size-limit": "^0.18.1" | ||
}, | ||
"peerDependencies": { | ||
"formdata-node": "0.3.3" | ||
}, | ||
"dependencies": { | ||
"lodash.isplainobject": "4.0.6" | ||
} | ||
} |
@@ -34,3 +34,3 @@ # object-to-form-data | ||
{ | ||
file: File, // this field will be represended as a window.File instance | ||
file: File, // this field will be represented as a window.File instance | ||
description: "I beat Twilight Sparkle and all I got was this lousy t-shirt." | ||
@@ -37,0 +37,0 @@ } |
const FormData = require("./form-data") | ||
const isPlainObject = require("lodash.isplainobject") | ||
const isPlainObject = require("./isPlainObject") | ||
const {assign, keys} = Object | ||
const isArray = Array.isArray | ||
const assign = Object.assign | ||
const keys = Object.keys | ||
@@ -69,3 +69,3 @@ const isFunction = value => typeof value === "function" | ||
} else { | ||
if ((options.strict && (isBoolean(field) && field === false))) { | ||
if (options.strict && (isBoolean(field) && field === false)) { | ||
continue | ||
@@ -72,0 +72,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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
7862
1
8
95
1
10
- Removedlodash.isplainobject@4.0.6
- Removedlodash.isplainobject@4.0.6(transitive)