Skip to content

Commit 177bac8

Browse files
committed
Coments and formatation
Signed-off-by: Fabio José <[email protected]>
1 parent 8bb188f commit 177bac8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ cloudevent01
6262
.source("urn:event:from:myapi/resourse/123");
6363

6464
/*
65-
* Backward compatibility by injecting methods from spec implementation to Cloudevent
65+
* Backward compatibility to spec 0.1 by injecting methods from spec implementation
66+
* to Cloudevent
6667
*/
6768
cloudevent01
6869
.eventTypeVersion("1.0");
@@ -88,12 +89,16 @@ cloudevent02
8889
```js
8990
var Cloudevent = require("cloudevents-sdk");
9091

91-
var cloudevent = new Cloudevent()
92-
.type("com.github.pull.create")
93-
.source("urn:event:from:myapi/resourse/123");
92+
/*
93+
* Creates an instance with default spec and format
94+
*/
95+
var cloudevent =
96+
new Cloudevent()
97+
.type("com.github.pull.create")
98+
.source("urn:event:from:myapi/resourse/123");
9499

95100
/*
96-
* Format the payload and return it.
101+
* Format the payload and return it
97102
*/
98103
var formatted = cloudevent.format();
99104

0 commit comments

Comments
 (0)