@a24/events
v0.0.29
Published
<br/> <br/> <center> <img src="https://author24.ru/assets/images/main/logo_black.svg" alt="Author24" /> </center> <br/>
Downloads
11
Readme
usage example
// event.ts
import { Events } from '@a24/events';
const events = new Events();
events.init(url, debounced, timeout);
events.setUserId(id);
export default events;
// other.ts
import { EventData } from '@a24/events';
const data: EventData = {...}
events.send(data);
, where
url - is the server URL that will be used for the request
userId - user id's, required param, string
timeout - specifies the number of milliseconds before the request times out. If the request takes longer than `timeout`, the request will be aborted. default is 5000
debounced - debouce fetch, optional param, boolean, default true
data - event data, required param, type EventData,