8000 id and time attributes · pengsrc/sdk-javascript@903891e · GitHub
[go: up one dir, main page]

Skip to content

Commit 903891e

Browse files
committed
id and time attributes
Signed-off-by: Fabio José <fabiojose@gmail.com>
1 parent 1b3922c commit 903891e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/cloudevent.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ Cloudevent.prototype.source = function(_source){
3838
return this;
3939
}
4040

41+
Cloudevent.prototype.id = function(_id){
42+
this.spec.id(_id);
43+
return this;
44+
}
45+
46+
Cloudevent.prototype.time = function(_time){
47+
this.spec.time(_time);
48+
return this;
49+
}
50+
4151
/*
4252
* Export the specs
4353
*/

0 commit comments

Comments
 (0)
0