@trenskow/app 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/request.js +4 -3
- package/lib/response.js +3 -3
- package/package.json +2 -2
package/lib/request.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//
|
|
2
2
|
// request.js
|
|
3
3
|
// @trenskow/app
|
|
4
|
-
//
|
|
4
|
+
//
|
|
5
5
|
// Created by Kristian Trenskow on 2021/11/07
|
|
6
6
|
// For license see LICENSE.
|
|
7
|
-
//
|
|
7
|
+
//
|
|
8
8
|
|
|
9
9
|
import { IncomingMessage } from 'http';
|
|
10
10
|
|
|
@@ -21,7 +21,8 @@ export default class Request extends IncomingMessage {
|
|
|
21
21
|
return target[caseit(property)];
|
|
22
22
|
},
|
|
23
23
|
set: (target, property, value) => {
|
|
24
|
-
|
|
24
|
+
target[caseit(property)] = value;
|
|
25
|
+
return true;
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
28
|
|
package/lib/response.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//
|
|
2
2
|
// response.js
|
|
3
3
|
// @trenskow/app
|
|
4
|
-
//
|
|
4
|
+
//
|
|
5
5
|
// Created by Kristian Trenskow on 2021/11/07
|
|
6
6
|
// For license see LICENSE.
|
|
7
|
-
//
|
|
7
|
+
//
|
|
8
8
|
|
|
9
9
|
import caseit from '@trenskow/caseit';
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ export default class Response extends ServerResponse {
|
|
|
23
23
|
} else {
|
|
24
24
|
target.setHeader(prop, value);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return true;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trenskow/app",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "A small HTTP router.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/trenskow/app#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"eslint": "^8.
|
|
28
|
+
"eslint": "^8.44.0",
|
|
29
29
|
"mocha": "^10.2.0",
|
|
30
30
|
"supertest": "^6.3.3"
|
|
31
31
|
},
|