"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isoTime = isoTime; exports.property = property; /** A time as Alexa wants it: ISO 8601 in UTC. Text is taken as given. */ function isoTime(time = new Date()) { return typeof time === "string" ? time : time.toISOString(); } /** One property of a context or of a change, its fields in the order of the examples. */ function property(namespace, name, value, options = {}) { return { namespace, ...(options.instance ? { instance: options.instance } : {}), name, value, timeOfSample: isoTime(options.timeOfSample), uncertaintyInMilliseconds: options.uncertaintyInMilliseconds ?? 0, }; }