node-red-contrib-web-worldmap 2.23.2 → 2.24.0

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.
Files changed (202) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +15 -23
  3. package/node_modules/body-parser/HISTORY.md +15 -0
  4. package/node_modules/body-parser/README.md +25 -12
  5. package/node_modules/body-parser/package.json +32 -35
  6. package/node_modules/{body-parser/node_modules/bytes → bytes}/History.md +5 -0
  7. package/node_modules/{body-parser/node_modules/bytes → bytes}/LICENSE +0 -0
  8. package/node_modules/{raw-body/node_modules/bytes → bytes}/Readme.md +42 -16
  9. package/node_modules/{raw-body/node_modules/bytes → bytes}/index.js +5 -1
  10. package/node_modules/{raw-body/node_modules/bytes → bytes}/package.json +20 -21
  11. package/node_modules/content-disposition/HISTORY.md +5 -0
  12. package/node_modules/content-disposition/README.md +3 -9
  13. package/node_modules/content-disposition/index.js +1 -1
  14. package/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +21 -0
  15. package/node_modules/content-disposition/node_modules/safe-buffer/README.md +584 -0
  16. package/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +187 -0
  17. package/node_modules/content-disposition/node_modules/safe-buffer/index.js +65 -0
  18. package/node_modules/content-disposition/node_modules/safe-buffer/package.json +76 -0
  19. package/node_modules/content-disposition/package.json +25 -28
  20. package/node_modules/cookie/HISTORY.md +5 -0
  21. package/node_modules/cookie/README.md +4 -0
  22. package/node_modules/cookie/index.js +5 -1
  23. package/node_modules/cookie/package.json +20 -23
  24. package/node_modules/express/History.md +33 -0
  25. package/node_modules/express/Readme.md +8 -5
  26. package/node_modules/express/lib/application.js +1 -1
  27. package/node_modules/express/lib/request.js +1 -1
  28. package/node_modules/express/lib/response.js +16 -11
  29. package/node_modules/express/lib/router/index.js +6 -0
  30. package/node_modules/express/lib/utils.js +2 -6
  31. package/node_modules/express/node_modules/safe-buffer/LICENSE +21 -0
  32. package/node_modules/express/node_modules/safe-buffer/README.md +584 -0
  33. package/node_modules/express/node_modules/safe-buffer/index.d.ts +187 -0
  34. package/node_modules/express/node_modules/safe-buffer/index.js +65 -0
  35. package/node_modules/express/node_modules/safe-buffer/package.json +76 -0
  36. package/node_modules/express/package.json +35 -36
  37. package/node_modules/faye-websocket/CHANGELOG.md +5 -0
  38. package/node_modules/faye-websocket/LICENSE.md +1 -1
  39. package/node_modules/faye-websocket/README.md +13 -13
  40. package/node_modules/faye-websocket/lib/faye/websocket/api.js +10 -8
  41. package/node_modules/faye-websocket/lib/faye/websocket/client.js +4 -4
  42. package/node_modules/faye-websocket/lib/faye/websocket.js +1 -1
  43. package/node_modules/faye-websocket/package.json +14 -17
  44. package/node_modules/forwarded/HISTORY.md +5 -0
  45. package/node_modules/forwarded/README.md +3 -3
  46. package/node_modules/forwarded/index.js +15 -1
  47. package/node_modules/forwarded/package.json +25 -26
  48. package/node_modules/http-errors/HISTORY.md +16 -0
  49. package/node_modules/http-errors/README.md +12 -6
  50. package/node_modules/http-errors/index.js +35 -2
  51. package/node_modules/http-errors/package.json +28 -31
  52. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
  53. package/node_modules/http-parser-js/README.md +39 -0
  54. package/node_modules/http-parser-js/http-parser.d.ts +175 -0
  55. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js +8 -5
  56. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json +17 -19
  57. package/node_modules/inherits/inherits.js +2 -0
  58. package/node_modules/inherits/inherits_browser.js +18 -14
  59. package/node_modules/inherits/package.json +15 -18
  60. package/node_modules/ipaddr.js/README.md +1 -1
  61. package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +6 -9
  62. package/node_modules/ipaddr.js/package.json +15 -17
  63. package/node_modules/proxy-addr/HISTORY.md +11 -0
  64. package/node_modules/proxy-addr/README.md +3 -19
  65. package/node_modules/proxy-addr/index.js +1 -1
  66. package/node_modules/proxy-addr/package.json +28 -31
  67. package/node_modules/qs/.editorconfig +9 -0
  68. package/node_modules/qs/.eslintignore +2 -1
  69. package/node_modules/qs/.eslintrc +15 -1
  70. package/node_modules/qs/.github/FUNDING.yml +12 -0
  71. package/node_modules/qs/.nycrc +13 -0
  72. package/node_modules/qs/CHANGELOG.md +103 -0
  73. package/node_modules/qs/LICENSE.md +29 -0
  74. package/node_modules/qs/README.md +34 -0
  75. package/node_modules/qs/dist/qs.js +117 -67
  76. package/node_modules/qs/lib/formats.js +9 -4
  77. package/node_modules/qs/lib/parse.js +29 -14
  78. package/node_modules/qs/lib/stringify.js +55 -46
  79. package/node_modules/qs/lib/utils.js +23 -2
  80. package/node_modules/qs/package.json +39 -31
  81. package/node_modules/qs/test/parse.js +97 -1
  82. package/node_modules/qs/test/stringify.js +115 -1
  83. package/node_modules/qs/test/utils.js +1 -1
  84. package/node_modules/raw-body/HISTORY.md +14 -0
  85. package/node_modules/raw-body/README.md +3 -5
  86. package/node_modules/raw-body/package.json +30 -33
  87. package/node_modules/send/HISTORY.md +10 -0
  88. package/node_modules/send/README.md +4 -6
  89. package/node_modules/send/index.js +7 -3
  90. package/node_modules/send/node_modules/ms/index.js +3 -3
  91. package/node_modules/send/node_modules/ms/license.md +1 -1
  92. package/node_modules/send/node_modules/ms/package.json +19 -21
  93. package/node_modules/send/node_modules/ms/readme.md +1 -2
  94. package/node_modules/send/package.json +28 -31
  95. package/node_modules/serve-static/HISTORY.md +8 -0
  96. package/node_modules/serve-static/README.md +9 -11
  97. package/node_modules/serve-static/package.json +28 -31
  98. package/node_modules/setprototypeof/README.md +1 -1
  99. package/node_modules/setprototypeof/index.js +1 -1
  100. package/node_modules/setprototypeof/package.json +17 -18
  101. package/node_modules/sockjs/Changelog +12 -0
  102. package/node_modules/sockjs/lib/transport.js +1 -1
  103. package/node_modules/sockjs/package.json +14 -16
  104. package/node_modules/toidentifier/HISTORY.md +9 -0
  105. package/node_modules/toidentifier/README.md +3 -3
  106. package/node_modules/toidentifier/index.js +2 -0
  107. package/node_modules/toidentifier/package.json +28 -27
  108. package/node_modules/uuid/CHANGELOG.md +154 -44
  109. package/node_modules/uuid/CONTRIBUTING.md +18 -0
  110. package/node_modules/uuid/LICENSE.md +4 -16
  111. package/node_modules/uuid/README.md +384 -155
  112. package/node_modules/uuid/dist/bin/uuid +2 -0
  113. package/node_modules/uuid/dist/esm-browser/index.js +9 -0
  114. package/node_modules/uuid/{lib/md5-browser.js → dist/esm-browser/md5.js} +70 -71
  115. package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  116. package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  117. package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  118. package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
  119. package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  120. package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  121. package/node_modules/uuid/{v1.js → dist/esm-browser/v1.js} +36 -50
  122. package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  123. package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
  124. package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
  125. package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  126. package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  127. package/node_modules/uuid/dist/esm-browser/version.js +11 -0
  128. package/node_modules/uuid/dist/esm-node/index.js +9 -0
  129. package/node_modules/uuid/dist/esm-node/md5.js +13 -0
  130. package/node_modules/uuid/dist/esm-node/nil.js +1 -0
  131. package/node_modules/uuid/dist/esm-node/parse.js +35 -0
  132. package/node_modules/uuid/dist/esm-node/regex.js +1 -0
  133. package/node_modules/uuid/dist/esm-node/rng.js +12 -0
  134. package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  135. package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
  136. package/node_modules/uuid/dist/esm-node/v1.js +95 -0
  137. package/node_modules/uuid/dist/esm-node/v3.js +4 -0
  138. package/node_modules/uuid/dist/esm-node/v35.js +64 -0
  139. package/node_modules/uuid/dist/esm-node/v4.js +24 -0
  140. package/node_modules/uuid/dist/esm-node/v5.js +4 -0
  141. package/node_modules/uuid/dist/esm-node/validate.js +7 -0
  142. package/node_modules/uuid/dist/esm-node/version.js +11 -0
  143. package/node_modules/uuid/dist/index.js +79 -0
  144. package/node_modules/uuid/dist/md5-browser.js +223 -0
  145. package/node_modules/uuid/dist/md5.js +23 -0
  146. package/node_modules/uuid/dist/nil.js +8 -0
  147. package/node_modules/uuid/dist/parse.js +45 -0
  148. package/node_modules/uuid/dist/regex.js +8 -0
  149. package/node_modules/uuid/dist/rng-browser.js +26 -0
  150. package/node_modules/uuid/dist/rng.js +24 -0
  151. package/node_modules/uuid/dist/sha1-browser.js +104 -0
  152. package/node_modules/uuid/dist/sha1.js +23 -0
  153. package/node_modules/uuid/dist/stringify.js +39 -0
  154. package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
  155. package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
  156. package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
  157. package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
  158. package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
  159. package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
  160. package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
  161. package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
  162. package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
  163. package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
  164. package/node_modules/uuid/dist/uuid-bin.js +85 -0
  165. package/node_modules/uuid/dist/v1.js +107 -0
  166. package/node_modules/uuid/dist/v3.js +16 -0
  167. package/node_modules/uuid/dist/v35.js +78 -0
  168. package/node_modules/uuid/dist/v4.js +37 -0
  169. package/node_modules/uuid/dist/v5.js +16 -0
  170. package/node_modules/uuid/dist/validate.js +17 -0
  171. package/node_modules/uuid/dist/version.js +21 -0
  172. package/node_modules/uuid/package.json +116 -55
  173. package/node_modules/uuid/wrapper.mjs +10 -0
  174. package/package.json +3 -3
  175. package/worldmap/index.html +1 -0
  176. package/worldmap/leaflet/leaflet-arc.min.js +1 -0
  177. package/worldmap/worldmap.js +49 -25
  178. package/worldmap.html +1 -1
  179. package/worldmap.js +2 -2
  180. package/node_modules/body-parser/node_modules/bytes/Readme.md +0 -126
  181. package/node_modules/body-parser/node_modules/bytes/index.js +0 -162
  182. package/node_modules/body-parser/node_modules/bytes/package.json +0 -86
  183. package/node_modules/qs/LICENSE +0 -28
  184. package/node_modules/qs/test/.eslintrc +0 -17
  185. package/node_modules/qs/test/index.js +0 -7
  186. package/node_modules/raw-body/node_modules/bytes/History.md +0 -87
  187. package/node_modules/raw-body/node_modules/bytes/LICENSE +0 -23
  188. package/node_modules/uuid/AUTHORS +0 -5
  189. package/node_modules/uuid/bin/uuid +0 -65
  190. package/node_modules/uuid/index.js +0 -8
  191. package/node_modules/uuid/lib/bytesToUuid.js +0 -26
  192. package/node_modules/uuid/lib/md5.js +0 -25
  193. package/node_modules/uuid/lib/rng-browser.js +0 -34
  194. package/node_modules/uuid/lib/rng.js +0 -8
  195. package/node_modules/uuid/lib/sha1-browser.js +0 -89
  196. package/node_modules/uuid/lib/sha1.js +0 -25
  197. package/node_modules/uuid/lib/v35.js +0 -57
  198. package/node_modules/uuid/v3.js +0 -4
  199. package/node_modules/uuid/v4.js +0 -29
  200. package/node_modules/uuid/v5.js +0 -3
  201. package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +0 -14
  202. package/node_modules/websocket-driver/node_modules/http-parser-js/README.md +0 -31
@@ -1,126 +0,0 @@
1
- # Bytes utility
2
-
3
- [![NPM Version][npm-image]][npm-url]
4
- [![NPM Downloads][downloads-image]][downloads-url]
5
- [![Build Status][travis-image]][travis-url]
6
- [![Test Coverage][coveralls-image]][coveralls-url]
7
-
8
- Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.
9
-
10
- ## Installation
11
-
12
- This is a [Node.js](https://nodejs.org/en/) module available through the
13
- [npm registry](https://www.npmjs.com/). Installation is done using the
14
- [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
15
-
16
- ```bash
17
- $ npm install bytes
18
- ```
19
-
20
- ## Usage
21
-
22
- ```js
23
- var bytes = require('bytes');
24
- ```
25
-
26
- #### bytes.format(number value, [options]): string|null
27
-
28
- Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is
29
- rounded.
30
-
31
- **Arguments**
32
-
33
- | Name | Type | Description |
34
- |---------|----------|--------------------|
35
- | value | `number` | Value in bytes |
36
- | options | `Object` | Conversion options |
37
-
38
- **Options**
39
-
40
- | Property | Type | Description |
41
- |-------------------|--------|-----------------------------------------------------------------------------------------|
42
- | decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. |
43
- | fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` |
44
- | thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `.`... Default value to `''`. |
45
- | unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). |
46
- | unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. |
47
-
48
- **Returns**
49
-
50
- | Name | Type | Description |
51
- |---------|------------------|-------------------------------------------------|
52
- | results | `string`|`null` | Return null upon error. String value otherwise. |
53
-
54
- **Example**
55
-
56
- ```js
57
- bytes(1024);
58
- // output: '1KB'
59
-
60
- bytes(1000);
61
- // output: '1000B'
62
-
63
- bytes(1000, {thousandsSeparator: ' '});
64
- // output: '1 000B'
65
-
66
- bytes(1024 * 1.7, {decimalPlaces: 0});
67
- // output: '2KB'
68
-
69
- bytes(1024, {unitSeparator: ' '});
70
- // output: '1 KB'
71
-
72
- ```
73
-
74
- #### bytes.parse(string|number value): number|null
75
-
76
- Parse the string value into an integer in bytes. If no unit is given, or `value`
77
- is a number, it is assumed the value is in bytes.
78
-
79
- Supported units and abbreviations are as follows and are case-insensitive:
80
-
81
- * `b` for bytes
82
- * `kb` for kilobytes
83
- * `mb` for megabytes
84
- * `gb` for gigabytes
85
- * `tb` for terabytes
86
- * `pb` for petabytes
87
-
88
- The units are in powers of two, not ten. This means 1kb = 1024b according to this parser.
89
-
90
- **Arguments**
91
-
92
- | Name | Type | Description |
93
- |---------------|--------|--------------------|
94
- | value | `string`|`number` | String to parse, or number in bytes. |
95
-
96
- **Returns**
97
-
98
- | Name | Type | Description |
99
- |---------|-------------|-------------------------|
100
- | results | `number`|`null` | Return null upon error. Value in bytes otherwise. |
101
-
102
- **Example**
103
-
104
- ```js
105
- bytes('1KB');
106
- // output: 1024
107
-
108
- bytes('1024');
109
- // output: 1024
110
-
111
- bytes(1024);
112
- // output: 1KB
113
- ```
114
-
115
- ## License
116
-
117
- [MIT](LICENSE)
118
-
119
- [coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master
120
- [coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master
121
- [downloads-image]: https://badgen.net/npm/dm/bytes
122
- [downloads-url]: https://npmjs.org/package/bytes
123
- [npm-image]: https://badgen.net/npm/node/bytes
124
- [npm-url]: https://npmjs.org/package/bytes
125
- [travis-image]: https://badgen.net/travis/visionmedia/bytes.js/master
126
- [travis-url]: https://travis-ci.org/visionmedia/bytes.js
@@ -1,162 +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.replace(formatThousandsRegExp, thousandsSeparator);
121
- }
122
-
123
- return str + unitSeparator + unit;
124
- }
125
-
126
- /**
127
- * Parse the string value into an integer in bytes.
128
- *
129
- * If no unit is given, it is assumed the value is in bytes.
130
- *
131
- * @param {number|string} val
132
- *
133
- * @returns {number|null}
134
- * @public
135
- */
136
-
137
- function parse(val) {
138
- if (typeof val === 'number' && !isNaN(val)) {
139
- return val;
140
- }
141
-
142
- if (typeof val !== 'string') {
143
- return null;
144
- }
145
-
146
- // Test if the string passed is valid
147
- var results = parseRegExp.exec(val);
148
- var floatValue;
149
- var unit = 'b';
150
-
151
- if (!results) {
152
- // Nothing could be extracted from the given string
153
- floatValue = parseInt(val, 10);
154
- unit = 'b'
155
- } else {
156
- // Retrieve the value and the unit
157
- floatValue = parseFloat(results[1]);
158
- unit = results[4].toLowerCase();
159
- }
160
-
161
- return Math.floor(map[unit] * floatValue);
162
- }
@@ -1,86 +0,0 @@
1
- {
2
- "_args": [
3
- [
4
- "bytes@3.1.0",
5
- "/Users/conway/Projects/worldmap"
6
- ]
7
- ],
8
- "_from": "bytes@3.1.0",
9
- "_id": "bytes@3.1.0",
10
- "_inBundle": false,
11
- "_integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
12
- "_location": "/body-parser/bytes",
13
- "_phantomChildren": {},
14
- "_requested": {
15
- "type": "version",
16
- "registry": true,
17
- "raw": "bytes@3.1.0",
18
- "name": "bytes",
19
- "escapedName": "bytes",
20
- "rawSpec": "3.1.0",
21
- "saveSpec": null,
22
- "fetchSpec": "3.1.0"
23
- },
24
- "_requiredBy": [
25
- "/body-parser"
26
- ],
27
- "_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
28
- "_spec": "3.1.0",
29
- "_where": "/Users/conway/Projects/worldmap",
30
- "author": {
31
- "name": "TJ Holowaychuk",
32
- "email": "tj@vision-media.ca",
33
- "url": "http://tjholowaychuk.com"
34
- },
35
- "bugs": {
36
- "url": "https://github.com/visionmedia/bytes.js/issues"
37
- },
38
- "contributors": [
39
- {
40
- "name": "Jed Watson",
41
- "email": "jed.watson@me.com"
42
- },
43
- {
44
- "name": "Théo FIDRY",
45
- "email": "theo.fidry@gmail.com"
46
- }
47
- ],
48
- "description": "Utility to parse a string bytes to bytes and vice-versa",
49
- "devDependencies": {
50
- "eslint": "5.12.1",
51
- "mocha": "5.2.0",
52
- "nyc": "13.1.0"
53
- },
54
- "engines": {
55
- "node": ">= 0.8"
56
- },
57
- "files": [
58
- "History.md",
59
- "LICENSE",
60
- "Readme.md",
61
- "index.js"
62
- ],
63
- "homepage": "https://github.com/visionmedia/bytes.js#readme",
64
- "keywords": [
65
- "byte",
66
- "bytes",
67
- "utility",
68
- "parse",
69
- "parser",
70
- "convert",
71
- "converter"
72
- ],
73
- "license": "MIT",
74
- "name": "bytes",
75
- "repository": {
76
- "type": "git",
77
- "url": "git+https://github.com/visionmedia/bytes.js.git"
78
- },
79
- "scripts": {
80
- "lint": "eslint .",
81
- "test": "mocha --check-leaks --reporter spec",
82
- "test-ci": "nyc --reporter=text npm test",
83
- "test-cov": "nyc --reporter=html --reporter=text npm test"
84
- },
85
- "version": "3.1.0"
86
- }
@@ -1,28 +0,0 @@
1
- Copyright (c) 2014 Nathan LaFreniere and other contributors.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are met:
6
- * Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
11
- * The names of any contributors may not be used to endorse or promote
12
- products derived from this software without specific prior written
13
- permission.
14
-
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
19
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
-
26
- * * *
27
-
28
- The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
@@ -1,17 +0,0 @@
1
- {
2
- "rules": {
3
- "array-bracket-newline": 0,
4
- "array-element-newline": 0,
5
- "consistent-return": 2,
6
- "function-paren-newline": 0,
7
- "max-lines": 0,
8
- "max-lines-per-function": 0,
9
- "max-nested-callbacks": [2, 3],
10
- "max-statements": 0,
11
- "no-buffer-constructor": 0,
12
- "no-extend-native": 0,
13
- "no-magic-numbers": 0,
14
- "object-curly-newline": 0,
15
- "sort-keys": 0
16
- }
17
- }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- require('./parse');
4
-
5
- require('./stringify');
6
-
7
- require('./utils');
@@ -1,87 +0,0 @@
1
- 3.1.0 / 2019-01-22
2
- ==================
3
-
4
- * Add petabyte (`pb`) support
5
-
6
- 3.0.0 / 2017-08-31
7
- ==================
8
-
9
- * Change "kB" to "KB" in format output
10
- * Remove support for Node.js 0.6
11
- * Remove support for ComponentJS
12
-
13
- 2.5.0 / 2017-03-24
14
- ==================
15
-
16
- * Add option "unit"
17
-
18
- 2.4.0 / 2016-06-01
19
- ==================
20
-
21
- * Add option "unitSeparator"
22
-
23
- 2.3.0 / 2016-02-15
24
- ==================
25
-
26
- * Drop partial bytes on all parsed units
27
- * Fix non-finite numbers to `.format` to return `null`
28
- * Fix parsing byte string that looks like hex
29
- * perf: hoist regular expressions
30
-
31
- 2.2.0 / 2015-11-13
32
- ==================
33
-
34
- * add option "decimalPlaces"
35
- * add option "fixedDecimals"
36
-
37
- 2.1.0 / 2015-05-21
38
- ==================
39
-
40
- * add `.format` export
41
- * add `.parse` export
42
-
43
- 2.0.2 / 2015-05-20
44
- ==================
45
-
46
- * remove map recreation
47
- * remove unnecessary object construction
48
-
49
- 2.0.1 / 2015-05-07
50
- ==================
51
-
52
- * fix browserify require
53
- * remove node.extend dependency
54
-
55
- 2.0.0 / 2015-04-12
56
- ==================
57
-
58
- * add option "case"
59
- * add option "thousandsSeparator"
60
- * return "null" on invalid parse input
61
- * support proper round-trip: bytes(bytes(num)) === num
62
- * units no longer case sensitive when parsing
63
-
64
- 1.0.0 / 2014-05-05
65
- ==================
66
-
67
- * add negative support. fixes #6
68
-
69
- 0.3.0 / 2014-03-19
70
- ==================
71
-
72
- * added terabyte support
73
-
74
- 0.2.1 / 2013-04-01
75
- ==================
76
-
77
- * add .component
78
-
79
- 0.2.0 / 2012-10-28
80
- ==================
81
-
82
- * bytes(200).should.eql('200b')
83
-
84
- 0.1.0 / 2012-07-04
85
- ==================
86
-
87
- * add bytes to string conversion [yields]
@@ -1,23 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
4
- Copyright (c) 2015 Jed Watson <jed.watson@me.com>
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining
7
- a copy of this software and associated documentation files (the
8
- 'Software'), to deal in the Software without restriction, including
9
- without limitation the rights to use, copy, modify, merge, publish,
10
- distribute, sublicense, and/or sell copies of the Software, and to
11
- permit persons to whom the Software is furnished to do so, subject to
12
- the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be
15
- included in all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,5 +0,0 @@
1
- Robert Kieffer <robert@broofa.com>
2
- Christoph Tavan <dev@tavan.de>
3
- AJ ONeal <coolaj86@gmail.com>
4
- Vincent Voyer <vincent@zeroload.net>
5
- Roman Shtylman <shtylman@gmail.com>
@@ -1,65 +0,0 @@
1
- #!/usr/bin/env node
2
- var assert = require('assert');
3
-
4
- function usage() {
5
- console.log('Usage:');
6
- console.log(' uuid');
7
- console.log(' uuid v1');
8
- console.log(' uuid v3 <name> <namespace uuid>');
9
- console.log(' uuid v4');
10
- console.log(' uuid v5 <name> <namespace uuid>');
11
- console.log(' uuid --help');
12
- console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
13
- }
14
-
15
- var args = process.argv.slice(2);
16
-
17
- if (args.indexOf('--help') >= 0) {
18
- usage();
19
- process.exit(0);
20
- }
21
- var version = args.shift() || 'v4';
22
-
23
- switch (version) {
24
- case 'v1':
25
- var uuidV1 = require('../v1');
26
- console.log(uuidV1());
27
- break;
28
-
29
- case 'v3':
30
- var uuidV3 = require('../v3');
31
-
32
- var name = args.shift();
33
- var namespace = args.shift();
34
- assert(name != null, 'v3 name not specified');
35
- assert(namespace != null, 'v3 namespace not specified');
36
-
37
- if (namespace == 'URL') namespace = uuidV3.URL;
38
- if (namespace == 'DNS') namespace = uuidV3.DNS;
39
-
40
- console.log(uuidV3(name, namespace));
41
- break;
42
-
43
- case 'v4':
44
- var uuidV4 = require('../v4');
45
- console.log(uuidV4());
46
- break;
47
-
48
- case 'v5':
49
- var uuidV5 = require('../v5');
50
-
51
- var name = args.shift();
52
- var namespace = args.shift();
53
- assert(name != null, 'v5 name not specified');
54
- assert(namespace != null, 'v5 namespace not specified');
55
-
56
- if (namespace == 'URL') namespace = uuidV5.URL;
57
- if (namespace == 'DNS') namespace = uuidV5.DNS;
58
-
59
- console.log(uuidV5(name, namespace));
60
- break;
61
-
62
- default:
63
- usage();
64
- process.exit(1);
65
- }
@@ -1,8 +0,0 @@
1
- var v1 = require('./v1');
2
- var v4 = require('./v4');
3
-
4
- var uuid = v4;
5
- uuid.v1 = v1;
6
- uuid.v4 = v4;
7
-
8
- module.exports = uuid;
@@ -1,26 +0,0 @@
1
- /**
2
- * Convert array of 16 byte values to UUID string format of the form:
3
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
4
- */
5
- var byteToHex = [];
6
- for (var i = 0; i < 256; ++i) {
7
- byteToHex[i] = (i + 0x100).toString(16).substr(1);
8
- }
9
-
10
- function bytesToUuid(buf, offset) {
11
- var i = offset || 0;
12
- var bth = byteToHex;
13
- // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
14
- return ([
15
- bth[buf[i++]], bth[buf[i++]],
16
- bth[buf[i++]], bth[buf[i++]], '-',
17
- bth[buf[i++]], bth[buf[i++]], '-',
18
- bth[buf[i++]], bth[buf[i++]], '-',
19
- bth[buf[i++]], bth[buf[i++]], '-',
20
- bth[buf[i++]], bth[buf[i++]],
21
- bth[buf[i++]], bth[buf[i++]],
22
- bth[buf[i++]], bth[buf[i++]]
23
- ]).join('');
24
- }
25
-
26
- module.exports = bytesToUuid;
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- var crypto = require('crypto');
4
-
5
- function md5(bytes) {
6
- if (typeof Buffer.from === 'function') {
7
- // Modern Buffer API
8
- if (Array.isArray(bytes)) {
9
- bytes = Buffer.from(bytes);
10
- } else if (typeof bytes === 'string') {
11
- bytes = Buffer.from(bytes, 'utf8');
12
- }
13
- } else {
14
- // Pre-v4 Buffer API
15
- if (Array.isArray(bytes)) {
16
- bytes = new Buffer(bytes);
17
- } else if (typeof bytes === 'string') {
18
- bytes = new Buffer(bytes, 'utf8');
19
- }
20
- }
21
-
22
- return crypto.createHash('md5').update(bytes).digest();
23
- }
24
-
25
- module.exports = md5;