Socket
Socket
Sign inDemoInstall

formdata-node

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formdata-node - npm Package Compare versions

Comparing version 1.0.1 to 1.2.0

.huskyrc.json

26

lib/FormData.js

@@ -38,4 +38,2 @@ "use strict";

var _nextTick = _interopRequireDefault(require("./util/nextTick"));
var _boundary = _interopRequireDefault(require("./util/boundary"));

@@ -53,5 +51,6 @@

var _isFunction = _interopRequireDefault(require("./util/isFunction"));
var _StreamIterator = _interopRequireDefault(require("./util/StreamIterator"));
// import isFunction from "./util/isFunction"
const isArray = Array.isArray;

@@ -84,7 +83,7 @@ /**

}) => {
this.__stream.push((0, _isBuffer.default)(value) ? value : Buffer.from(String(value)));
if (done) {
return this.__stream.push(null);
this.__stream.push(null);
}
this.__stream.push((0, _isBuffer.default)(value) ? value : Buffer.from(String(value)));
};

@@ -202,9 +201,7 @@

while (true) {
yield (0, _awaitAsyncGenerator2.default)((0, _nextTick.default)());
const curr = _this.__entries.next(); // Send a footer when iterator ends
const curr = _this.__entries.next();
if (curr.done === true) {
yield _this.__getFooter();
return;
return _this.__getFooter();
}

@@ -221,11 +218,4 @@

if ((0, _isReadable.default)(value)) {
// TODO:
// Node.js 10 allows to use Symbol.asyncIterator directly from
// Readable, but the feature is experimental.
// Uncomment it after stabilization
// yield* isFunction(value[Symbol.asyncIterator])
// ? value
// : new StreamIterator(value)
// Read the stream content
yield* (0, _asyncGeneratorDelegate2.default)((0, _asyncIterator2.default)(new _StreamIterator.default(value)), _awaitAsyncGenerator2.default);
yield* (0, _asyncGeneratorDelegate2.default)((0, _asyncIterator2.default)((0, _isFunction.default)(value[_symbol.default.asyncIterator]) ? value : new _StreamIterator.default(value)), _awaitAsyncGenerator2.default);
} else {

@@ -232,0 +222,0 @@ yield value;

{
"name": "formdata-node",
"version": "1.0.1",
"version": "1.2.0",
"description": "FormData implementation for Node.js. Built over Readable stream and async generators. Can be used to communicate between servers with multipart/form-data format.",

@@ -16,3 +16,3 @@ "repository": "octet-stream/form-data",

"engines": {
"node": ">=7.6"
"node": ">= 8"
},

@@ -31,5 +31,3 @@ "scripts": {

"report": "yarn cleanup && yarn make:ci && node_modules/.bin/nyc yarn test && node_modules/.bin/nyc report --reporter=html yarn test && yarn cleanup && yarn make",
"ci": "yarn make:ci && node_modules/.bin/nyc yarn test && node_modules/.bin/nyc report --reporter=lcov yarn test && node_modules/.bin/codecov && yarn cleanup && yarn make",
"precommit": "yarn staged",
"prepush": "yarn report"
"ci": "yarn make:ci && node_modules/.bin/nyc yarn test && node_modules/.bin/nyc report --reporter=lcov yarn test && node_modules/.bin/codecov && yarn cleanup && yarn make"
},

@@ -43,32 +41,32 @@ "ava": {

"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
"@babel/core": "7.0.0-beta.49",
"@babel/plugin-proposal-async-generator-functions": "7.0.0-beta.49",
"@babel/plugin-proposal-class-properties": "7.0.0-beta.49",
"@babel/plugin-proposal-decorators": "7.0.0-beta.49",
"@babel/plugin-transform-async-to-generator": "7.0.0-beta.49",
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.49",
"@babel/plugin-transform-runtime": "7.0.0-beta.49",
"@octetstream/eslint-config": "2.1.0",
"@babel/cli": "7.0.0-beta.54",
"@babel/core": "7.0.0-beta.54",
"@babel/plugin-proposal-async-generator-functions": "7.0.0-beta.54",
"@babel/plugin-proposal-class-properties": "7.0.0-beta.54",
"@babel/plugin-proposal-decorators": "7.0.0-beta.54",
"@babel/plugin-transform-async-to-generator": "7.0.0-beta.54",
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.54",
"@babel/plugin-transform-runtime": "7.0.0-beta.54",
"@octetstream/eslint-config": "3.0.0",
"ava": "0.25.0",
"codecov": "3.0.2",
"eslint": "4.19.1",
"eslint-plugin-ava": "4.5.1",
"husky": "0.14.3",
"lint-staged": "^7.1.2",
"codecov": "3.1.0",
"eslint": "5.6.1",
"eslint-plugin-ava": "5.1.1",
"husky": "1.1.1",
"lint-staged": "^7.3.0",
"lodash.isplainobject": "4.0.6",
"nyc": "11.8.0",
"promise-fs": "1.3.0",
"proxyquire": "2.0.1",
"nyc": "13.0.1",
"promise-fs": "2.0.1",
"proxyquire": "2.1.0",
"rimraf": "2.6.2",
"sinon": "5.0.10",
"supertest": "3.1.0",
"then-busboy": "2.3.4"
"sinon": "6.3.5",
"supertest": "3.3.0",
"then-busboy": "3.0.0"
},
"dependencies": {
"@babel/runtime": "7.0.0-beta.49",
"@babel/runtime": "7.0.0-beta.54",
"@octetstream/invariant": "1.1.0",
"mime-types": "2.1.18",
"nanoid": "1.0.2"
"mime-types": "2.1.20",
"nanoid": "1.2.6"
}
}

@@ -109,3 +109,3 @@ # FormData

##### `getAll(name) -> {string[] | Buffer[] | stream.Readable[]}`
##### `getAll(name) -> {Array<string | Buffer | stream.Readable>}`

@@ -112,0 +112,0 @@ Returns all the values associated with a given key from within a **FormData** object.

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