Skip to content

Commit f7d4e76

Browse files
committed
feat(*): initial implementation
1 parent a564c2a commit f7d4e76

File tree

8 files changed

+2267
-0
lines changed

8 files changed

+2267
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ typings/
5757
# dotenv environment variables file
5858
.env
5959

60+
/dist
61+
62+
.npmrc

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/*
2+
!/dist

example.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import * as WebSocket from 'ws';
2+
import { Client } from './src/Client';
3+
4+
const c = new Client({
5+
make(address: string): WebSocket {
6+
return new WebSocket(address);
7+
}
8+
});
9+
10+
c.connect();
11+
c.getSocket().on('data', console.log);
12+
c.on('error', console.error);
13+
c.on('connect', () => {
14+
c.setIncludeDetectors(false);
15+
c.setArea({
16+
latitude: 55.5,
17+
longitude: 2,
18+
},
19+
{
20+
latitude: 45.3,
21+
longitude: 18,
22+
});
23+
})
24+
c.on('data', strike => console.log(strike));

0 commit comments

Comments
 (0)