u8-mqtt 0.5.2 → 0.6.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 (116) hide show
  1. package/README.md +23 -6
  2. package/cjs/basic-v4.cjs +293 -284
  3. package/cjs/basic-v4.cjs.map +1 -1
  4. package/cjs/basic-v5.cjs +307 -288
  5. package/cjs/basic-v5.cjs.map +1 -1
  6. package/cjs/full-v4.cjs +1538 -0
  7. package/cjs/full-v4.cjs.map +1 -0
  8. package/cjs/full-v5.cjs +1812 -0
  9. package/cjs/full-v5.cjs.map +1 -0
  10. package/cjs/index.cjs +320 -302
  11. package/cjs/index.cjs.map +1 -1
  12. package/cjs/v4.cjs +305 -296
  13. package/cjs/v4.cjs.map +1 -1
  14. package/cjs/v5.cjs +319 -300
  15. package/cjs/v5.cjs.map +1 -1
  16. package/code/_cmdid_dispatch.jsy +45 -69
  17. package/code/_conn.jsy +96 -72
  18. package/code/_dispatch.jsy +36 -28
  19. package/code/_utils.jsy +17 -0
  20. package/code/base.jsy +35 -63
  21. package/code/core.jsy +78 -56
  22. package/code/full-v4.js +20 -0
  23. package/code/full-v5.js +29 -0
  24. package/code/router_path.jsy +2 -1
  25. package/esm/basic-v4.js +293 -284
  26. package/esm/basic-v4.js.map +1 -1
  27. package/esm/basic-v5.js +307 -288
  28. package/esm/basic-v5.js.map +1 -1
  29. package/esm/deno/basic-v4.js +297 -288
  30. package/esm/deno/basic-v4.js.map +1 -1
  31. package/esm/deno/basic-v5.js +311 -292
  32. package/esm/deno/basic-v5.js.map +1 -1
  33. package/esm/deno/full-v4.js +1526 -0
  34. package/esm/deno/full-v4.js.map +1 -0
  35. package/esm/deno/full-v5.js +1798 -0
  36. package/esm/deno/full-v5.js.map +1 -0
  37. package/esm/deno/index.js +324 -305
  38. package/esm/deno/index.js.map +1 -1
  39. package/esm/deno/v4.js +309 -300
  40. package/esm/deno/v4.js.map +1 -1
  41. package/esm/deno/v5.js +323 -304
  42. package/esm/deno/v5.js.map +1 -1
  43. package/esm/full-v4.js +1526 -0
  44. package/esm/full-v4.js.map +1 -0
  45. package/esm/full-v5.js +1798 -0
  46. package/esm/full-v5.js.map +1 -0
  47. package/esm/index.js +320 -301
  48. package/esm/index.js.map +1 -1
  49. package/esm/node/basic-v4.js +293 -284
  50. package/esm/node/basic-v4.js.map +1 -1
  51. package/esm/node/basic-v4.mjs +293 -284
  52. package/esm/node/basic-v4.mjs.map +1 -1
  53. package/esm/node/basic-v5.js +307 -288
  54. package/esm/node/basic-v5.js.map +1 -1
  55. package/esm/node/basic-v5.mjs +307 -288
  56. package/esm/node/basic-v5.mjs.map +1 -1
  57. package/esm/node/full-v4.js +1529 -0
  58. package/esm/node/full-v4.js.map +1 -0
  59. package/esm/node/full-v4.mjs +1529 -0
  60. package/esm/node/full-v4.mjs.map +1 -0
  61. package/esm/node/full-v5.js +1801 -0
  62. package/esm/node/full-v5.js.map +1 -0
  63. package/esm/node/full-v5.mjs +1801 -0
  64. package/esm/node/full-v5.mjs.map +1 -0
  65. package/esm/node/index.js +320 -301
  66. package/esm/node/index.js.map +1 -1
  67. package/esm/node/index.mjs +320 -301
  68. package/esm/node/index.mjs.map +1 -1
  69. package/esm/node/v4.js +305 -296
  70. package/esm/node/v4.js.map +1 -1
  71. package/esm/node/v4.mjs +305 -296
  72. package/esm/node/v4.mjs.map +1 -1
  73. package/esm/node/v5.js +319 -300
  74. package/esm/node/v5.js.map +1 -1
  75. package/esm/node/v5.mjs +319 -300
  76. package/esm/node/v5.mjs.map +1 -1
  77. package/esm/v4.js +305 -296
  78. package/esm/v4.js.map +1 -1
  79. package/esm/v5.js +319 -300
  80. package/esm/v5.js.map +1 -1
  81. package/esm/web/basic-v4.js +293 -284
  82. package/esm/web/basic-v4.js.map +1 -1
  83. package/esm/web/basic-v4.min.js +1 -1
  84. package/esm/web/basic-v4.min.js.br +0 -0
  85. package/esm/web/basic-v4.min.js.gz +0 -0
  86. package/esm/web/basic-v5.js +307 -288
  87. package/esm/web/basic-v5.js.map +1 -1
  88. package/esm/web/basic-v5.min.js +1 -1
  89. package/esm/web/basic-v5.min.js.br +0 -0
  90. package/esm/web/basic-v5.min.js.gz +0 -0
  91. package/esm/web/full-v4.js +1526 -0
  92. package/esm/web/full-v4.js.map +1 -0
  93. package/esm/web/full-v4.min.js +1 -0
  94. package/esm/web/full-v4.min.js.br +0 -0
  95. package/esm/web/full-v4.min.js.gz +0 -0
  96. package/esm/web/full-v5.js +1798 -0
  97. package/esm/web/full-v5.js.map +1 -0
  98. package/esm/web/full-v5.min.js +1 -0
  99. package/esm/web/full-v5.min.js.br +0 -0
  100. package/esm/web/full-v5.min.js.gz +0 -0
  101. package/esm/web/index.js +320 -301
  102. package/esm/web/index.js.map +1 -1
  103. package/esm/web/index.min.js +1 -1
  104. package/esm/web/index.min.js.br +0 -0
  105. package/esm/web/index.min.js.gz +0 -0
  106. package/esm/web/v4.js +305 -296
  107. package/esm/web/v4.js.map +1 -1
  108. package/esm/web/v4.min.js +1 -1
  109. package/esm/web/v4.min.js.br +0 -0
  110. package/esm/web/v4.min.js.gz +0 -0
  111. package/esm/web/v5.js +319 -300
  112. package/esm/web/v5.js.map +1 -1
  113. package/esm/web/v5.min.js +1 -1
  114. package/esm/web/v5.min.js.br +0 -0
  115. package/esm/web/v5.min.js.gz +0 -0
  116. package/package.json +7 -8
package/README.md CHANGED
@@ -1,8 +1,11 @@
1
- # u8-mqtt
1
+ # [u8-mqtt ![npm published version][img-npm-ver]][npm-u8-mqtt] [![][img-deps] ![][img-treeshake] ![][img-min] ![][img-minzip]][bundlephobia-u8-mqtt]
2
2
 
3
3
  A JavaScript MQTT client using async/await support QOS-0 and QOS-1.
4
- Zero external dependencies. [Tree-shaking friendly](https://rollupjs.org/guide/en/).
5
- Suited for use in modern ES6 environments: the Browser, [NodeJS](https://nodejs.org/en/), and [Deno](https://deno.land/).
4
+ for use in modern ES6 environments: the Browser, [NodeJS](https://nodejs.org/en/), and [Deno](https://deno.land/).
5
+
6
+ - Zero external dependencies.
7
+ - [Small bundle][bundlephobia-u8-mqtt] footprint.
8
+ - [Tree-shaking](https://rollupjs.org/guide/en/) friendly.
6
9
 
7
10
  Use ExpressJS-like router to handle publish messages for matching topics.
8
11
 
@@ -18,6 +21,14 @@ Use ExpressJS-like router to handle publish messages for matching topics.
18
21
  [u8-mqtt-packet]: https://github.com/shanewholloway/js-u8-mqtt-packet
19
22
  [regexparam]: https://github.com/lukeed/regexparam#readme
20
23
 
24
+ [npm-u8-mqtt]: https://www.npmjs.com/package/u8-mqtt
25
+ [bundlephobia-u8-mqtt]: https://bundlephobia.com/package/u8-mqtt
26
+ [img-npm-ver]: https://badgen.net/npm/v/u8-mqtt
27
+ [img-min]: https://badgen.net/bundlephobia/min/u8-mqtt
28
+ [img-minzip]: https://badgen.net/bundlephobia/minzip/u8-mqtt
29
+ [img-deps]: https://badgen.net/bundlephobia/dependency-count/u8-mqtt
30
+ [img-treeshake]: https://badgen.net/bundlephobia/tree-shaking/u8-mqtt
31
+
21
32
 
22
33
  ## Docs
23
34
 
@@ -67,7 +78,8 @@ await my_mqtt.json_send(
67
78
 
68
79
  ## Module size
69
80
 
70
- Built for small footprint with ES Modules (ESM) using embedded [u8-mqtt-packet][] and [regexparam][] libraries.
81
+ Built for small bundle footprint with ES Modules (ESM) using embedded [u8-mqtt-packet][] and [regexparam][] libraries.
82
+ (See [BundlePhobia][bundlephobia-u8-mqtt] page)
71
83
 
72
84
  | module | brotli | minified |
73
85
  |:------------------------|---------:|---------:|
@@ -75,7 +87,8 @@ Built for small footprint with ES Modules (ESM) using embedded [u8-mqtt-packet][
75
87
  | `u8-mqtt/esm/v5.min.js` | 6504 B | 19789 B |
76
88
  | `u8-mqtt/esm/v4.min.js` | 5420 B | 15379 B |
77
89
 
78
- [automated sizing report](./docs/compressed.md)
90
+ ([automated sizing report](./docs/compressed.md))
91
+
79
92
 
80
93
  #### MQTT Client sizes
81
94
 
@@ -93,7 +106,11 @@ Built for small footprint with ES Modules (ESM) using embedded [u8-mqtt-packet][
93
106
 
94
107
  ## Prior Art
95
108
 
96
- The `u8-mqtt` project was inspired by [mqtt](https://github.com/mqttjs/MQTT.js#readme) and [mqtt-packet](https://github.com/mqttjs/mqtt-packet) written for NodeJS. The codecs of those project are written with a NodeJS ecosystem in mind: Buffer, EventEmitter, Streams.
109
+ The `u8-mqtt` project was inspired by [mqtt](orig-mqtt) and [mqtt-packet](orig-mqtt-packet) written for NodeJS.
110
+ The codecs of those project are written with a NodeJS ecosystem in mind: Buffer, EventEmitter, Streams.
111
+
112
+ [orig-mqtt]: https://github.com/mqttjs/MQTT.js#readme
113
+ [orig-mqtt-packet]: https://github.com/mqttjs/mqtt-packet#readme
97
114
 
98
115
 
99
116
  ## License