node-red-contrib-web-worldmap 5.0.5 → 5.0.7
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/CHANGELOG.md +2 -2
- package/README.md +3 -1
- package/examples/Custom Tooltip.json +83 -0
- package/node_modules/accepts/node_modules/negotiator/HISTORY.md +108 -0
- package/node_modules/{body-parser/node_modules/bytes → accepts/node_modules/negotiator}/LICENSE +3 -2
- package/node_modules/accepts/node_modules/negotiator/README.md +203 -0
- package/node_modules/accepts/node_modules/negotiator/index.js +82 -0
- package/node_modules/accepts/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/accepts/node_modules/negotiator/lib/encoding.js +184 -0
- package/node_modules/accepts/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/accepts/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/accepts/node_modules/negotiator/package.json +42 -0
- package/node_modules/bytes/History.md +15 -0
- package/node_modules/bytes/Readme.md +45 -18
- package/node_modules/bytes/index.js +15 -4
- package/node_modules/bytes/package.json +7 -4
- package/node_modules/compression/HISTORY.md +15 -0
- package/node_modules/compression/README.md +4 -6
- package/node_modules/compression/index.js +3 -8
- package/node_modules/compression/package.json +19 -19
- package/node_modules/negotiator/HISTORY.md +5 -0
- package/node_modules/negotiator/README.md +9 -0
- package/node_modules/negotiator/index.js +4 -4
- package/node_modules/negotiator/lib/encoding.js +26 -5
- package/node_modules/negotiator/lib/mediaType.js +3 -3
- package/node_modules/negotiator/package.json +1 -1
- package/node_modules/object-inspect/CHANGELOG.md +12 -0
- package/node_modules/object-inspect/index.js +17 -3
- package/node_modules/object-inspect/package.json +6 -6
- package/node_modules/object-inspect/test/quoteStyle.js +9 -0
- package/node_modules/safe-buffer/index.js +3 -0
- package/node_modules/safe-buffer/package.json +18 -4
- package/node_modules/tslib/modules/index.d.ts +1 -0
- package/node_modules/tslib/modules/index.js +2 -0
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +7 -0
- package/node_modules/tslib/tslib.es6.js +24 -1
- package/node_modules/tslib/tslib.es6.mjs +24 -1
- package/node_modules/tslib/tslib.js +56 -1
- package/package.json +1 -1
- package/worldmap/worldmap.js +7 -4
- package/worldmap.js +2 -2
- package/node_modules/body-parser/node_modules/bytes/History.md +0 -97
- package/node_modules/body-parser/node_modules/bytes/Readme.md +0 -152
- package/node_modules/body-parser/node_modules/bytes/index.js +0 -170
- package/node_modules/body-parser/node_modules/bytes/package.json +0 -42
- package/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/content-disposition/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/content-disposition/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/content-disposition/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/express/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/express/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/express/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/express/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/express/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/raw-body/node_modules/bytes/History.md +0 -97
- package/node_modules/raw-body/node_modules/bytes/LICENSE +0 -23
- package/node_modules/raw-body/node_modules/bytes/Readme.md +0 -152
- package/node_modules/raw-body/node_modules/bytes/index.js +0 -170
- package/node_modules/raw-body/node_modules/bytes/package.json +0 -42
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* bytes
|
|
3
|
-
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
4
|
-
* Copyright(c) 2015 Jed Watson
|
|
5
|
-
* MIT Licensed
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Module exports.
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
module.exports = bytes;
|
|
16
|
-
module.exports.format = format;
|
|
17
|
-
module.exports.parse = parse;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Module variables.
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
25
|
-
|
|
26
|
-
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
27
|
-
|
|
28
|
-
var map = {
|
|
29
|
-
b: 1,
|
|
30
|
-
kb: 1 << 10,
|
|
31
|
-
mb: 1 << 20,
|
|
32
|
-
gb: 1 << 30,
|
|
33
|
-
tb: Math.pow(1024, 4),
|
|
34
|
-
pb: Math.pow(1024, 5),
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Convert the given value in bytes into a string or parse to string to an integer in bytes.
|
|
41
|
-
*
|
|
42
|
-
* @param {string|number} value
|
|
43
|
-
* @param {{
|
|
44
|
-
* case: [string],
|
|
45
|
-
* decimalPlaces: [number]
|
|
46
|
-
* fixedDecimals: [boolean]
|
|
47
|
-
* thousandsSeparator: [string]
|
|
48
|
-
* unitSeparator: [string]
|
|
49
|
-
* }} [options] bytes options.
|
|
50
|
-
*
|
|
51
|
-
* @returns {string|number|null}
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
function bytes(value, options) {
|
|
55
|
-
if (typeof value === 'string') {
|
|
56
|
-
return parse(value);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (typeof value === 'number') {
|
|
60
|
-
return format(value, options);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Format the given value in bytes into a string.
|
|
68
|
-
*
|
|
69
|
-
* If the value is negative, it is kept as such. If it is a float,
|
|
70
|
-
* it is rounded.
|
|
71
|
-
*
|
|
72
|
-
* @param {number} value
|
|
73
|
-
* @param {object} [options]
|
|
74
|
-
* @param {number} [options.decimalPlaces=2]
|
|
75
|
-
* @param {number} [options.fixedDecimals=false]
|
|
76
|
-
* @param {string} [options.thousandsSeparator=]
|
|
77
|
-
* @param {string} [options.unit=]
|
|
78
|
-
* @param {string} [options.unitSeparator=]
|
|
79
|
-
*
|
|
80
|
-
* @returns {string|null}
|
|
81
|
-
* @public
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
function format(value, options) {
|
|
85
|
-
if (!Number.isFinite(value)) {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
var mag = Math.abs(value);
|
|
90
|
-
var thousandsSeparator = (options && options.thousandsSeparator) || '';
|
|
91
|
-
var unitSeparator = (options && options.unitSeparator) || '';
|
|
92
|
-
var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
|
|
93
|
-
var fixedDecimals = Boolean(options && options.fixedDecimals);
|
|
94
|
-
var unit = (options && options.unit) || '';
|
|
95
|
-
|
|
96
|
-
if (!unit || !map[unit.toLowerCase()]) {
|
|
97
|
-
if (mag >= map.pb) {
|
|
98
|
-
unit = 'PB';
|
|
99
|
-
} else if (mag >= map.tb) {
|
|
100
|
-
unit = 'TB';
|
|
101
|
-
} else if (mag >= map.gb) {
|
|
102
|
-
unit = 'GB';
|
|
103
|
-
} else if (mag >= map.mb) {
|
|
104
|
-
unit = 'MB';
|
|
105
|
-
} else if (mag >= map.kb) {
|
|
106
|
-
unit = 'KB';
|
|
107
|
-
} else {
|
|
108
|
-
unit = 'B';
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
var val = value / map[unit.toLowerCase()];
|
|
113
|
-
var str = val.toFixed(decimalPlaces);
|
|
114
|
-
|
|
115
|
-
if (!fixedDecimals) {
|
|
116
|
-
str = str.replace(formatDecimalsRegExp, '$1');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (thousandsSeparator) {
|
|
120
|
-
str = str.split('.').map(function (s, i) {
|
|
121
|
-
return i === 0
|
|
122
|
-
? s.replace(formatThousandsRegExp, thousandsSeparator)
|
|
123
|
-
: s
|
|
124
|
-
}).join('.');
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return str + unitSeparator + unit;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Parse the string value into an integer in bytes.
|
|
132
|
-
*
|
|
133
|
-
* If no unit is given, it is assumed the value is in bytes.
|
|
134
|
-
*
|
|
135
|
-
* @param {number|string} val
|
|
136
|
-
*
|
|
137
|
-
* @returns {number|null}
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
|
|
141
|
-
function parse(val) {
|
|
142
|
-
if (typeof val === 'number' && !isNaN(val)) {
|
|
143
|
-
return val;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (typeof val !== 'string') {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Test if the string passed is valid
|
|
151
|
-
var results = parseRegExp.exec(val);
|
|
152
|
-
var floatValue;
|
|
153
|
-
var unit = 'b';
|
|
154
|
-
|
|
155
|
-
if (!results) {
|
|
156
|
-
// Nothing could be extracted from the given string
|
|
157
|
-
floatValue = parseInt(val, 10);
|
|
158
|
-
unit = 'b'
|
|
159
|
-
} else {
|
|
160
|
-
// Retrieve the value and the unit
|
|
161
|
-
floatValue = parseFloat(results[1]);
|
|
162
|
-
unit = results[4].toLowerCase();
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (isNaN(floatValue)) {
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return Math.floor(map[unit] * floatValue);
|
|
170
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bytes",
|
|
3
|
-
"description": "Utility to parse a string bytes to bytes and vice-versa",
|
|
4
|
-
"version": "3.1.2",
|
|
5
|
-
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
|
|
6
|
-
"contributors": [
|
|
7
|
-
"Jed Watson <jed.watson@me.com>",
|
|
8
|
-
"Théo FIDRY <theo.fidry@gmail.com>"
|
|
9
|
-
],
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"byte",
|
|
13
|
-
"bytes",
|
|
14
|
-
"utility",
|
|
15
|
-
"parse",
|
|
16
|
-
"parser",
|
|
17
|
-
"convert",
|
|
18
|
-
"converter"
|
|
19
|
-
],
|
|
20
|
-
"repository": "visionmedia/bytes.js",
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"eslint": "7.32.0",
|
|
23
|
-
"eslint-plugin-markdown": "2.2.1",
|
|
24
|
-
"mocha": "9.2.0",
|
|
25
|
-
"nyc": "15.1.0"
|
|
26
|
-
},
|
|
27
|
-
"files": [
|
|
28
|
-
"History.md",
|
|
29
|
-
"LICENSE",
|
|
30
|
-
"Readme.md",
|
|
31
|
-
"index.js"
|
|
32
|
-
],
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">= 0.8"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"lint": "eslint .",
|
|
38
|
-
"test": "mocha --check-leaks --reporter spec",
|
|
39
|
-
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
40
|
-
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Feross Aboukhadijeh
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|