fostrom 0.0.8 → 0.0.9

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 (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fostrom",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Fostrom's Official Device SDK for JS. Fostrom (https://fostrom.io) is an IoT Cloud Platform.",
5
5
  "keywords": [
6
6
  "fostrom",
package/readme.md CHANGED
@@ -17,7 +17,7 @@ const fostrom = new Fostrom({
17
17
 
18
18
  // Setup the on_mail handler, to process incoming mail.
19
19
  fostrom.onMail = async (mail) => {
20
- {id, name, payload, mailbox_size} = mail
20
+ const {id, name, payload, mailbox_size} = mail
21
21
  console.debug(`Received Mail (${mailbox_size}): ${name} ${id}`)
22
22
  await mail.ack()
23
23
  }
@@ -35,6 +35,8 @@ async function main() {
35
35
  main()
36
36
  ```
37
37
 
38
+ Please note, to use `import Fostrom from 'fostrom';` you'll need to set `"type": "module"` in `package.json`.
39
+
38
40
  ## A Note on the Device Agent
39
41
 
40
42
  The Fostrom Device SDK downloads and runs the Fostrom Device Agent in the background. The Agent is downloaded when the package is installed through `npm`. The Device Agent is started when `fostrom.connect()` is called, and it remains running in the background forever.