Backend half
This commit is contained in:
-6
@@ -1,9 +1,3 @@
|
||||
1.0.0 / 2024-08-31
|
||||
==================
|
||||
|
||||
* drop node <18
|
||||
* allow utf8 as alias for utf-8
|
||||
|
||||
0.5.4 / 2021-12-10
|
||||
==================
|
||||
|
||||
|
||||
+3
-4
@@ -243,7 +243,7 @@ function format (obj) {
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
param = params[i]
|
||||
|
||||
var val = param.slice(-1) === '*'
|
||||
var val = param.substr(-1) === '*'
|
||||
? ustring(parameters[param])
|
||||
: qstring(parameters[param])
|
||||
|
||||
@@ -281,7 +281,6 @@ function decodefield (str) {
|
||||
value = getlatin1(binary)
|
||||
break
|
||||
case 'utf-8':
|
||||
case 'utf8':
|
||||
value = Buffer.from(binary, 'binary').toString('utf8')
|
||||
break
|
||||
default:
|
||||
@@ -333,7 +332,7 @@ function parse (string) {
|
||||
var value
|
||||
|
||||
// calculate index to start at
|
||||
index = PARAM_REGEXP.lastIndex = match[0].slice(-1) === ';'
|
||||
index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
|
||||
? index - 1
|
||||
: index
|
||||
|
||||
@@ -370,7 +369,7 @@ function parse (string) {
|
||||
if (value[0] === '"') {
|
||||
// remove quotes and escapes
|
||||
value = value
|
||||
.slice(1, -1)
|
||||
.substr(1, value.length - 2)
|
||||
.replace(QESC_REGEXP, '$1')
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "content-disposition",
|
||||
"description": "Create and parse Content-Disposition header",
|
||||
"version": "1.0.0",
|
||||
"version": "0.5.4",
|
||||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -23,8 +23,8 @@
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-promise": "5.2.0",
|
||||
"eslint-plugin-standard": "4.1.0",
|
||||
"mocha": "^9.2.2",
|
||||
"nyc": "15.1.0"
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "9.1.3"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
@@ -38,7 +38,7 @@
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "mocha --reporter spec --bail --check-leaks test/",
|
||||
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
||||
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user