Skip to content

Commit

Permalink
feat(*): initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSchick committed Jul 30, 2017
1 parent a564c2a commit f7d4e76
Show file tree
Hide file tree
Showing 8 changed files with 2,267 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ typings/
# dotenv environment variables file
.env

/dist

.npmrc
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
!/dist
24 changes: 24 additions & 0 deletions example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as WebSocket from 'ws';
import { Client } from './src/Client';

const c = new Client({
make(address: string): WebSocket {
return new WebSocket(address);
}
});

c.connect();
c.getSocket().on('data', console.log);
c.on('error', console.error);
c.on('connect', () => {
c.setIncludeDetectors(false);
c.setArea({
latitude: 55.5,
longitude: 2,
},
{
latitude: 45.3,
longitude: 18,
});
})
c.on('data', strike => console.log(strike));
Loading

0 comments on commit f7d4e76

Please sign in to comment.