Skip to content

Latest commit

 

History

History
136 lines (67 loc) · 3.29 KB

uaparser.md

File metadata and controls

136 lines (67 loc) · 3.29 KB

ua-parser

Source: index.js

uaParser.parseUA(str)

Parse the User-Agent string str for User-Agent

Parameters:

  • {string} str - Browsers User-Agent string

Return:

{Object} - { family:, major:, minor:, patch: }

Go: TOC | uaParser

uaParser.parseEngine(str)

Parse the User-Agent string str for Engine

Parameters:

  • {string} str - Browsers User-Agent string

Return:

{Object} - { family:, major:, minor:, patch: }

Go: TOC | uaParser

uaParser.parseOS(str)

Parse the User-Agent string str for Operating System

Parameters:

  • {string} str - Browsers User-Agent string

Return:

{Object} - { family:, major:, minor:, patch:, patchMinor: }

Go: TOC | uaParser

uaParser.parseDevice(str)

Parse the User-Agent string str for Device

Parameters:

  • {string} str - Browsers User-Agent string

Return:

{Object} { family:, brand:, model: }

Go: TOC | uaParser

uaParser.parse(str)

Parse the User-Agent string str for User-Agent, Operating System, Device

Parameters:

  • {string} str - Browsers User-Agent string

Return:

{Object} - { family:, brand:, model: }

Go: TOC | uaParser

uaParser.loadSync(options)

Synchronously load the ua-parsers regexes file

Parameters:

  • {Object | string} options - (optional) if "undefined" than default file is choosen. If string is given than that file is used.

Return:

{Boolean} true if file was loaded otherwise false.

Go: TOC | uaParser

uaParser.load(options, callback)

Asynchronously load the ua-parsers regexes file

Parameters:

  • {Object | string} options - (optional) if "undefined" than default file is choosen. If string is given than that file is used.

  • {Function} callback - callback(error)

Go: TOC | uaParser

uaParser.watch(options, callback)

Watch a regexes file and reload if there are any changes

Parameters:

  • {Object | string} options - (optional) if "undefined" than default file is choosen. If string is given than that file is used.

  • {Function} callback - callback(error)

Go: TOC | uaParser

—generated by apidox