u8-mqtt 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -33,10 +33,10 @@ Targeting [MQTT-3.1.1 (v4)][spec-3.1.1] and [MQTT-5.0.0 (v5)][spec-5.0.0] compat
33
33
 
34
34
  ## Use
35
35
 
36
- - from [Web CDN](./use_from_web_cdn.md)
37
- - from [Web bundler](./use_from_web_bundler.md) like [Rollup][] or [ESBuild][]
38
- - from [NodeJS](./use_from_nodejs.md)
39
- - from [Deno](./use_from_deno.md)
36
+ - from [Web CDN](./docs/use_from_web_cdn.md)
37
+ - from [Web bundler](./docs/use_from_web_bundler.md) like [Rollup][] or [ESBuild][]
38
+ - from [NodeJS](./docs/use_from_nodejs.md)
39
+ - from [Deno](./docs/use_from_deno.md)
40
40
 
41
41
  [Rollup]: https://rollupjs.org
42
42
  [ESBuild]: https://esbuild.github.io
@@ -65,15 +65,30 @@ await my_mqtt.json_send(
65
65
  live: new Date().toISOString() })
66
66
  ```
67
67
 
68
- ## Sizes
68
+ ## Module size
69
69
 
70
70
  Built for small footprint with ES Modules (ESM) using embedded [u8-mqtt-packet][] and [regexparam][] libraries.
71
71
 
72
- | Size | (x) | Measurement
73
- |-------|-----|------------
74
- | 187KB | 13x | `curl -sL https://cdn.jsdelivr.net/npm/mqtt@4.0.1/dist/mqtt.min.js \| wc -c`
75
- | 32KB | 2x | `curl -sL https://cdn.jsdelivr.net/npm/paho-mqtt@1.1.0/paho-mqtt.min.js \| wc -c`
76
- | 19KB | 1x | `cat ./u8-mqtt/esm/web/index.min.mjs \| wc -c`
72
+ | module | brotli | minified |
73
+ |:------------------------|---------:|---------:|
74
+ | `u8-mqtt` | 6476 B | 19895 B |
75
+ | `u8-mqtt/esm/v5.min.js` | 6384 B | 19694 B |
76
+ | `u8-mqtt/esm/v4.min.js` | 5290 B | 15287 B |
77
+
78
+ [automated sizing report](./docs/compressed.md)
79
+
80
+ #### MQTT Client sizes
81
+
82
+ | minifeid | (x) | Project | Measurement |
83
+ |---------:|-----:|----------------|-------------|
84
+ | 187.0KB | 12x | [MQTT.js][] | `curl -sL https://cdn.jsdelivr.net/npm/mqtt@4.0.1/dist/mqtt.min.js \| wc -c`
85
+ | 32.3KB | 2x | [paho][] | `curl -sL https://cdn.jsdelivr.net/npm/paho-mqtt@1.1.0/paho-mqtt.min.js \| wc -c`
86
+ | 19.9KB | 1.3x | [u8-mqtt][] v5 | `cat ./u8-mqtt/esm/web/v5.min.mjs \| wc -c`
87
+ | 15.5KB | 1x | [u8-mqtt][] v4 | `cat ./u8-mqtt/esm/web/v4.min.mjs \| wc -c`
88
+
89
+ [MQTT.js]: https://github.com/mqttjs/MQTT.js/
90
+ [paho]: https://github.com/eclipse/paho.mqtt.javascript/
91
+ [u8-mqtt]: https://github.com/shanewholloway/js-u8-mqtt/
77
92
 
78
93
 
79
94
  ## Prior Art
package/cjs/index.cjs CHANGED
@@ -1565,6 +1565,8 @@ class MQTTCore extends MQTTBase {
1565
1565
 
1566
1566
  return this} }
1567
1567
 
1568
+ var version = "0.3.1";
1569
+
1568
1570
  const MQTTClient_v4 = /* #__PURE__ */
1569
1571
  MQTTCore.mqtt_ctx(4, mqtt_opts_v5);
1570
1572
 
@@ -1593,4 +1595,5 @@ exports.ao_defer_v = ao_defer_v;
1593
1595
  exports["default"] = mqtt_v4;
1594
1596
  exports.mqtt_v4 = mqtt_v4;
1595
1597
  exports.mqtt_v5 = mqtt_v5;
1598
+ exports.version = version;
1596
1599
  //# sourceMappingURL=index.cjs.map