-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (30 loc) · 843 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
export function ds(...params) {
const instance = {...LaraDumps}.generateIds();
params.forEach((param) => instance.dump(param));
return instance;
};
export function dsq(...params) {
return ds(...params).die();
};
export function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export function configure({
port = 9191,
host = '127.0.0.1',
autoInvoke = false,
}) {
let server = `http://${host}:${port}`;
globalThis.CONFIG_LARADUMPS.host = server;
globalThis.CONFIG_LARADUMPS.autoInvokeApp = autoInvoke;
}
globalThis.ds = ds;
globalThis.dsd = dsq;
globalThis._sleep = sleep;
globalThis.CONFIG_LARADUMPS = {
host: 'http://127.0.0.1:9191',
autoInvokeApp: false
};
import LaraDumps from "./src/LaraDumps";
export default LaraDumps;
globalThis.LaraDumps = LaraDumps;