UNPKG

fingerprint-oss

Version:

A comprehensive JavaScript library for device fingerprinting and system information collection. Provides robust, deterministic fingerprinting for web applications with privacy-conscious design.

50 lines (49 loc) 1.65 kB
/*! * Bowser - a browser detector * https://github.com/bowser-js/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 */ import Parser, { ParsedResult } from './parser.js'; /** * Bowser class. * Keep it simple as much as it can be. * It's supposed to work with collections of {@link Parser} instances * rather then solve one-instance problems. * All the one-instance stuff is located in Parser class. * * @class * @classdesc Bowser is a static object, that provides an API to the Parsers * @hideconstructor */ declare class Bowser { /** * Creates a {@link Parser} instance * * @param {String} UA UserAgent string * @param {Boolean} [skipParsing=false] Will make the Parser postpone parsing until you ask it * explicitly. Same as `skipParsing` for {@link Parser}. * @returns {Parser} * @throws {Error} when UA is not a String * * @example * const parser = Bowser.getParser(window.navigator.userAgent); * const result = parser.getResult(); */ static getParser(UA: string, skipParsing?: boolean): Parser; /** * Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately * * @param UA * @return {ParsedResult} * * @example * const result = Bowser.parse(window.navigator.userAgent); */ static parse(UA: string): ParsedResult; static get BROWSER_MAP(): Record<string, string>; static get ENGINE_MAP(): Record<string, string>; static get OS_MAP(): Record<string, string>; static get PLATFORMS_MAP(): Record<string, string>; } export default Bowser;