Skip to content

appVersion

Get app version from user agent.

Usage

js
import { appVersion } from 'js-cool'

Signature

typescript
function appVersion(appName: string, userAgent?: string): string | null

Parameters

ParameterTypeDescription
appNamestringApp name to find
userAgentstringCustom UA (optional)

Returns

string | null - Version string or null.

Examples

js
appVersion('Chrome') // '120.0.0.0'
appVersion('Safari') // '17.0'
appVersion('NonExistent') // null

Released under the MIT License.