manner.js 0.0.45 → 0.0.47

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/server/index.js DELETED
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "formatHttpDate", {
7
- enumerable: true,
8
- get: function () {
9
- return _formatHttpDate.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "formatHttpKey", {
13
- enumerable: true,
14
- get: function () {
15
- return _formatHttpKey.default;
16
- }
17
- });
18
- Object.defineProperty(exports, "readCookie", {
19
- enumerable: true,
20
- get: function () {
21
- return _readCookie.default;
22
- }
23
- });
24
- var _readCookie = _interopRequireDefault(require("./lib/readCookie"));
25
- var _formatHttpDate = _interopRequireDefault(require("./lib/formatHttpDate"));
26
- var _formatHttpKey = _interopRequireDefault(require("./lib/formatHttpKey"));
27
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = formateHttpDate;
7
- function formateHttpDate(ms) {
8
- const date = new Date(ms);
9
- let [week, month, day, year, time, zone] = date.toString().split(' ');
10
- zone = zone.split('+')[0];
11
- return month + ', ' + day + ' ' + month + ' ' + year + ' ' + time + ' ' + zone;
12
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = formateHttpKey;
7
- function formateHttpKey(key) {
8
- return key.split('-').map(v => {
9
- return v.substring(0, 1).toUpperCase() + v.substring(1, v.length);
10
- }).join('-');
11
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.readCookie = readCookie;
7
- function readCookie(cookie) {
8
- const cookies = {};
9
- if (typeof cookie === 'string') {
10
- cookie.split(';').forEach(i => {
11
- const [key, value] = i.split('=');
12
- cookies[key.trim()] = value;
13
- });
14
- }
15
- const namespaces = {};
16
- Object.keys(cookies).forEach(k => {
17
- const result = k.split('_');
18
- if (result.length === 2) {
19
- const [namespace, key] = result;
20
- if (namespaces[namespace] === undefined) {
21
- namespaces[namespace] = {};
22
- }
23
- namespaces[namespace][key] = cookies[k];
24
- }
25
- });
26
- return namespaces;
27
- }