mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
The type definitions for ua-parser-js are missing undefined on
its return values. UAParser will return undefined if given an
invalid user agent string, and will also return undefined on
values that can't be figured out based on a valid string.
For instance:
const UAParser = require("ua-parser-js")
const ua = new UAParser("Fake ua")
console.log(ua.getBrowser().name) // undefined
|
||
|---|---|---|
| .. | ||
| index.d.ts | ||
| tsconfig.json | ||
| ua-parser-js-tests.ts | ||