This commit makes a substantial change to the API, changing the CloudEvent class to accept properties as an object in the constructor. For example: ```js const CloudEvent = require('cloudevents-sdk'); // all event properties except extensions may be set in the constructor const event = new CloudEvent({ source: 'http://my.event.source', type: 'test-event-type' }); // get and set all properties standard property notation console.log(event.time); // the event timestamp event.subject = 'my event subject'; ``` Signed-off-by: Lance Ball <lball@redhat.com> |
||
---|---|---|
.. | ||
ignore-typedef.js |