Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The CloudEvents SDK requires a current LTS version of Node.js. At the moment
those are Node.js 10.x and Node.js 12.x. To install in your Node.js project:

```console
npm install cloudevents-sdk
npm install cloudevents
```

### Receiving and Emitting Events
Expand All @@ -37,7 +37,7 @@ binary and structured events in either the 1.0 or 0.3 protocol formats.
const {
CloudEvent,
Receiver
} = require("cloudevents-sdk");
} = require("cloudevents");

// Create a receiver to accept events over HTTP
const receiver = new Receiver();
Expand All @@ -58,7 +58,7 @@ structured events, add `Protocol.HTTPStructured` as a parameter to
`emitter.send()`.

```js
const { CloudEvent, Emitter, Protocol, Version } = require("cloudevents-sdk");
const { CloudEvent, Emitter, Protocol, Version } = require("cloudevents");

// With only an endpoint URL, this creates a v1 emitter
const emitter = new Emitter({
Expand Down Expand Up @@ -101,7 +101,7 @@ All created `CloudEvent` objects are read-only. If you need to update a propert
```js
const {
CloudEvent,
} = require("cloudevents-sdk");
} = require("cloudevents");

// Create a new CloudEvent
const ce = new CloudEvent({...});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cloudevents-sdk",
"name": "cloudevents",
"version": "2.0.2",
"description": "CloudEvents SDK for JavaScript",
"main": "dist/index.js",
Expand Down