MCPcopy Index your code
hub / github.com/WebThingsIO/webthing-node / asEventDescription

Method asEventDescription

lib/event.ts:40–52  ·  view source on GitHub ↗

* Get the event description. * * @returns {Object} Description of the event as an object.

()

Source from the content-addressed store, hash-verified

38 * @returns {Object} Description of the event as an object.
39 */
40 asEventDescription(): Event.EventDescription {
41 const description: Event.EventDescription = {
42 [this.name]: {
43 timestamp: this.time,
44 },
45 };
46
47 if (this.data !== null) {
48 description[this.name].data = this.data;
49 }
50
51 return description;
52 }
53
54 /**
55 * Get the thing associated with this event.

Callers 2

getEventDescriptionsMethod · 0.80
eventNotifyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected