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

Method getProperty

lib/thing.ts:345–352  ·  view source on GitHub ↗

* Get a property's value. * * @param {String} propertyName Name of the property to get the value of * * @returns {*} Current property value if found, else null

(propertyName: string)

Source from the content-addressed store, hash-verified

343 * @returns {*} Current property value if found, else null
344 */
345 getProperty(propertyName: string): any|null {
346 const prop = this.findProperty(propertyName);
347 if (prop) {
348 return prop.getValue();
349 }
350
351 return null;
352 }
353
354 /**
355 * Get a mapping of all properties and their values.

Callers 2

getMethod · 0.80
putMethod · 0.80

Calls 2

findPropertyMethod · 0.95
getValueMethod · 0.80

Tested by

no test coverage detected