mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 15:10:03 +00:00
18 lines
388 B
TypeScript
18 lines
388 B
TypeScript
|
import { version } from "../package.json";
|
||
|
|
||
|
import type AlgoliaAnalytics from "./insights";
|
||
|
|
||
|
export const DEFAULT_ALGOLIA_AGENTS = [
|
||
|
`insights-js (${version})`,
|
||
|
`insights-js-${__FLAVOR__} (${version})`
|
||
|
];
|
||
|
|
||
|
export function addAlgoliaAgent(
|
||
|
this: AlgoliaAnalytics,
|
||
|
algoliaAgent: string
|
||
|
): void {
|
||
|
if (this._ua.indexOf(algoliaAgent) === -1) {
|
||
|
this._ua.push(algoliaAgent);
|
||
|
}
|
||
|
}
|