mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-30 01:14:25 +03:00
Update readme: using TypeScript
This commit is contained in:
18
readme.md
18
readme.md
@@ -25,7 +25,7 @@
|
|||||||
* `getBrowser()`
|
* `getBrowser()`
|
||||||
* returns `{ name: '', version: '' }`
|
* returns `{ name: '', version: '' }`
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Possible 'browser.name':
|
# Possible 'browser.name':
|
||||||
2345Explorer, Amaya, Android Browser, Arora, Avant, BIDUBrowser, Baidu,
|
2345Explorer, Amaya, Android Browser, Arora, Avant, BIDUBrowser, Baidu,
|
||||||
Basilisk, Blazer, Bolt, Bowser, Camino, Chimera, Chrome Headless,
|
Basilisk, Blazer, Bolt, Bowser, Camino, Chimera, Chrome Headless,
|
||||||
@@ -47,7 +47,7 @@ Vivaldi, Waterfox, WeChat, Yandex, baidu, iCab, w3m
|
|||||||
* `getDevice()`
|
* `getDevice()`
|
||||||
* returns `{ model: '', type: '', vendor: '' }`
|
* returns `{ model: '', type: '', vendor: '' }`
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Possible 'device.type':
|
# Possible 'device.type':
|
||||||
console, mobile, tablet, smarttv, wearable, embedded
|
console, mobile, tablet, smarttv, wearable, embedded
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Xbox, Xiaomi, ZTE
|
|||||||
* `getEngine()`
|
* `getEngine()`
|
||||||
* returns `{ name: '', version: '' }`
|
* returns `{ name: '', version: '' }`
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Possible 'engine.name'
|
# Possible 'engine.name'
|
||||||
Amaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto,
|
Amaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto,
|
||||||
Tasman, Trident, w3m, WebKit
|
Tasman, Trident, w3m, WebKit
|
||||||
@@ -74,7 +74,7 @@ Tasman, Trident, w3m, WebKit
|
|||||||
* `getOS()`
|
* `getOS()`
|
||||||
* returns `{ name: '', version: '' }`
|
* returns `{ name: '', version: '' }`
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Possible 'os.name'
|
# Possible 'os.name'
|
||||||
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,
|
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,
|
||||||
Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS,
|
Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS,
|
||||||
@@ -89,7 +89,7 @@ Ubuntu, Unix, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
|
|||||||
* `getCPU()`
|
* `getCPU()`
|
||||||
* returns `{ architecture: '' }`
|
* returns `{ architecture: '' }`
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Possible 'cpu.architecture'
|
# Possible 'cpu.architecture'
|
||||||
68k, amd64, arm[64], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
|
68k, amd64, arm[64], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
|
||||||
```
|
```
|
||||||
@@ -233,6 +233,14 @@ $ bower install ua-parser-js
|
|||||||
$ meteor add faisalman:ua-parser-js
|
$ meteor add faisalman:ua-parser-js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Using TypeScript
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ npm install --save @types/ua-parser-js
|
||||||
|
# Download TS type definition from DefinitelyTyped repository:
|
||||||
|
# https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ua-parser-js
|
||||||
|
```
|
||||||
|
|
||||||
## Using CLI
|
## Using CLI
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
Reference in New Issue
Block a user