-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib!: change CloudEvent to use direct object notation and get/set pro…
…perties (#172) 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>
- Loading branch information
Showing
50 changed files
with
2,021 additions
and
2,301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.