Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #25 from orbitdb/release-0.2.0-rc1
Browse files Browse the repository at this point in the history
Release 0.2.0 rc1
  • Loading branch information
latenssi authored Sep 30, 2019
2 parents 6cdaab6 + a734ba8 commit ba74585
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2016-2018 Protocol Labs Inc.
Copyright (c) 2018 Haja Networks Oy
Copyright (c) 2018-2019 Haja Networks Oy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,37 @@ npm install orbit_
See [examples/browser/index.html](examples/browser/index.html) for a more detailed example.

```javascript
"use strict";
'use strict'

const Orbit = require("orbit_");
const Orbit = require('orbit_')

const ipfs = new Ipfs();
const ipfs = new Ipfs()

ipfs.on("ready", () => {
const orbit = new Orbit(ipfs);
ipfs.on('ready', () => {
const orbit = new Orbit(ipfs)

const username = "Example Bot";
const channel = "HelloWorld";
const username = 'Example Bot'
const channel = 'HelloWorld'

orbit.events.on("connected", () => {
console.log(`-!- Orbit connected`);
orbit.join(channel);
});
orbit.events.on('connected', () => {
console.log(`-!- Orbit connected`)
orbit.join(channel)
})

orbit.events.on("joined", channelName => {
orbit.send(channelName, "/me is now caching this channel");
console.log(`-!- Joined #${channelName}`);
});
orbit.events.on('joined', channelName => {
orbit.send(channelName, '/me is now caching this channel')
console.log(`-!- Joined #${channelName}`)
})

// Listen for new messages
orbit.events.on("entry", (entry, channelName) => {
const post = entry.payload.value;
console.log(`[${post.meta.ts}] <${post.meta.from.name}> ${post.content}`);
});
orbit.events.on('entry', (entry, channelName) => {
const post = entry.payload.value
console.log(`[${post.meta.ts}] <${post.meta.from.name}> ${post.content}`)
})

// Connect to Orbit network
orbit.connect(username).catch(e => console.error(e));
});
orbit.connect(username).catch(e => console.error(e))
})
```

## API
Expand Down Expand Up @@ -136,4 +136,4 @@ For specific guidelines for contributing to this repository, check out the [Cont

## License

[MIT](LICENSE) © 2016-2018 Protocol Labs Inc., Haja Networks Oy
[MIT](LICENSE) © 2016-2019 Protocol Labs Inc., Haja Networks Oy
14 changes: 7 additions & 7 deletions dist/orbit.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions examples/browser/lib/orbit.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orbit_",
"version": "0.2.0",
"version": "0.2.0-rc1",
"description": "Orbit communication protocol and library",
"main": "src/Orbit.js",
"browserslist": [
Expand All @@ -11,7 +11,7 @@
],
"dependencies": {
"logplease": "~1.2.15",
"orbit-db": "github:orbitdb/orbit-db#master"
"orbit-db": "0.22.0-rc5"
},
"devDependencies": {
"@babel/core": "^7.6.2",
Expand Down

0 comments on commit ba74585

Please sign in to comment.