From 177bac8c3855bf77d15b7763ec440e8aed9ab922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Fri, 18 Jan 2019 23:05:41 -0200 Subject: [PATCH] Coments and formatation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 05855a7..63dbb72 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,8 @@ cloudevent01 .source("urn:event:from:myapi/resourse/123"); /* - * Backward compatibility by injecting methods from spec implementation to Cloudevent + * Backward compatibility to spec 0.1 by injecting methods from spec implementation + * to Cloudevent */ cloudevent01 .eventTypeVersion("1.0"); @@ -88,12 +89,16 @@ cloudevent02 ```js var Cloudevent = require("cloudevents-sdk"); -var cloudevent = new Cloudevent() - .type("com.github.pull.create") - .source("urn:event:from:myapi/resourse/123"); +/* + * Creates an instance with default spec and format + */ +var cloudevent = + new Cloudevent() + .type("com.github.pull.create") + .source("urn:event:from:myapi/resourse/123"); /* - * Format the payload and return it. + * Format the payload and return it */ var formatted = cloudevent.format();