https://project.mdnd-it.cc/work_packages/94
This commit is contained in:
2025-08-23 04:25:28 +02:00
parent 725516ad6c
commit 19cfa031d0
25823 changed files with 1095587 additions and 2801760 deletions
+6
View File
@@ -1,3 +1,9 @@
1.0.0 / 2024-08-31
==================
* drop node <18
* allow utf8 as alias for utf-8
0.5.4 / 2021-12-10
==================
+4 -3
View File
@@ -243,7 +243,7 @@ function format (obj) {
for (var i = 0; i < params.length; i++) {
param = params[i]
var val = param.substr(-1) === '*'
var val = param.slice(-1) === '*'
? ustring(parameters[param])
: qstring(parameters[param])
@@ -281,6 +281,7 @@ function decodefield (str) {
value = getlatin1(binary)
break
case 'utf-8':
case 'utf8':
value = Buffer.from(binary, 'binary').toString('utf8')
break
default:
@@ -332,7 +333,7 @@ function parse (string) {
var value
// calculate index to start at
index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
index = PARAM_REGEXP.lastIndex = match[0].slice(-1) === ';'
? index - 1
: index
@@ -369,7 +370,7 @@ function parse (string) {
if (value[0] === '"') {
// remove quotes and escapes
value = value
.substr(1, value.length - 2)
.slice(1, -1)
.replace(QESC_REGEXP, '$1')
}
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "content-disposition",
"description": "Create and parse Content-Disposition header",
"version": "0.5.4",
"version": "1.0.0",
"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",
"istanbul": "0.4.5",
"mocha": "9.1.3"
"mocha": "^9.2.2",
"nyc": "15.1.0"
},
"files": [
"LICENSE",
@@ -38,7 +38,7 @@
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks 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/"
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}