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

@octetstream/object-to-form-data

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octetstream/object-to-form-data - npm Package Compare versions

Comparing version 0.4.0 to 1.0.0

isPlainObject.js

18

form-data.js

@@ -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 @@ }

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