Installation
npm install --save @types/vigour-ua
Summary
This package contains type definitions for vigour-ua (https://github.com/vigour-io/ua#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vigour-ua.
index.d.ts
declare namespace ua {
interface UserAgent {
[value: string]: string | number;
browser: string;
prefix: string;
version: number;
}
}
/**
* Returns an object representing the user agent including data such as browser, device and platform
* @param _ua the raw user agent string to be converted
* @param obj object to be merged to the output result
* @returns object representing your user agent
*/
declare function ua(_ua: string): ua.UserAgent;
/**
* Returns an object representing the user agent including data such as browser, device and platform
* @param _ua the raw user agent string to be converted
* @returns object representing your user agent
*/
declare function ua<T extends object>(_ua: string, obj: T): ua.UserAgent & T;
export = ua;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Florian Keller.