Comparing version
@@ -14,3 +14,7 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
function createClient(options) { | ||
if (typeof options === 'string') options = {url: options}; | ||
if (typeof (options) === 'string') { | ||
options = { | ||
url: options | ||
}; | ||
} | ||
@@ -50,3 +54,8 @@ var assert = require('assert-plus'); | ||
function createJsonClient(options) { | ||
if (typeof options === 'string') options = {url: options}; | ||
if (typeof (options) === 'string') { | ||
options = { | ||
url: options | ||
}; | ||
} | ||
options = options ? shallowCopy(options) : {}; | ||
@@ -59,3 +68,8 @@ options.type = 'json'; | ||
function createStringClient(options) { | ||
if (typeof options === 'string') options = {url: options}; | ||
if (typeof (options) === 'string') { | ||
options = { | ||
url: options | ||
}; | ||
} | ||
options = options ? shallowCopy(options) : {}; | ||
@@ -68,3 +82,8 @@ options.type = 'string'; | ||
function createHttpClient(options) { | ||
if (typeof options === 'string') options = {url: options}; | ||
if (typeof (options) === 'string') { | ||
options = { | ||
url: options | ||
}; | ||
} | ||
options = options ? shallowCopy(options) : {}; | ||
@@ -71,0 +90,0 @@ options.type = 'http'; |
@@ -39,5 +39,10 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
var form = new formidable.IncomingForm(); | ||
// enable multiple files on a single upload field | ||
// (html5 multiple attribute) | ||
form.multiples = options.multiples || false; | ||
form.keepExtensions = options.keepExtensions ? true : false; | ||
if (options.uploadDir) | ||
form.uploadDir = options.uploadDir; | ||
if (options.maxFieldsSize) | ||
form.maxFieldsSize = options.maxFieldsSize; | ||
@@ -44,0 +49,0 @@ form.onPart = function onPart(part) { |
@@ -93,3 +93,3 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
if (tmp[1].indexOf('q=') !== -1) { | ||
q = parseFloat(tmp[1].split('=')[1], 10) * 10; | ||
q = parseFloat(tmp[1].split('=')[1]) * 10; | ||
} | ||
@@ -96,0 +96,0 @@ } |
@@ -37,3 +37,3 @@ { | ||
"description": "REST framework", | ||
"version": "2.8.2", | ||
"version": "2.8.3", | ||
"repository": { | ||
@@ -40,0 +40,0 @@ "type": "git", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
180144
0.22%4651
0.45%