@arirocha/openrisk-client 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
# openrisk-client
|
|
1
|
+
# @arirocha/openrisk-client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Browser SDK for OpenRisk. Collects client signals and sends them to your OpenRisk ingest endpoint.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
|
|
8
|
+
npm i @arirocha/openrisk-client
|
|
7
9
|
```
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## Usage
|
|
10
12
|
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
+
```ts
|
|
14
|
+
import { OpenRiskClient } from "@arirocha/openrisk-client";
|
|
15
|
+
|
|
16
|
+
const client = new OpenRiskClient({
|
|
17
|
+
projectKey: "pk_test",
|
|
18
|
+
endpoint: "https://your-server.com/ingest",
|
|
19
|
+
debug: true,
|
|
20
|
+
});
|
|
13
21
|
```
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
## Browser bundle
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
If you prefer a plain browser import:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { OpenRiskClient } from "@arirocha/openrisk-client/browser";
|
|
19
29
|
```
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
## Repo
|
|
32
|
+
|
|
33
|
+
OpenRisk monorepo: https://github.com/ari-rocha/openrisk
|