@@ -159,7 +159,7 @@ Linpus, Linspire,Linux, Mac OS, Maemo, Mageia, Mandriva, Manjaro, MeeGo, Minix,
159
159
Mint, Morph OS, NetBSD, NetRange, NetTV, Nintendo, OpenBSD, OpenVMS, OS/2, Palm,
160
160
PC-BSD, PCLinuxOS, Plan9, PlayStation, QNX, Raspbian, RedHat, RIM Tablet OS,
161
161
RISC OS, Sabayon, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen,
162
- Ubuntu, Unix, VectorLinux, Viera, WebOS, Windows [Phone/Mobile], Zenwalk, ...
162
+ Ubuntu, Unix, VectorLinux, Viera, watchOS, WebOS, Windows [Phone/Mobile], Zenwalk, ...
163
163
164
164
# 'os.version' determined dynamically
165
165
```
@@ -182,7 +182,7 @@ Ubuntu, Unix, VectorLinux, Viera, WebOS, Windows [Phone/Mobile], Zenwalk, ...
182
182
#### * is() utility ` [email protected] `
183
183
184
184
``` js
185
- // Is just a shorthand to check whether one of the specified properties has equal value
185
+ // Is just a shorthand to check whether specified item has a property with equals value (case-insensitive)
186
186
// so that instead of write it using `==` operator like this:
187
187
188
188
let ua = UAParser ();
@@ -198,7 +198,7 @@ if (device.is("mobile") && !os.is("iOS")) {}
198
198
if (device .is (" smarttv" ) || device .is (" Samsung" )) {}
199
199
200
200
/*
201
- Properties will be checked in this particular order:
201
+ Each properties will be checked in this particular order:
202
202
* browser : name
203
203
* cpu : architecture
204
204
* device : type, model, vendor
@@ -220,10 +220,11 @@ uap.getOS().is("Windows Phone"); // true
220
220
uap .getDevice (); // { vendor: "Nokia", model: "Lumia 635", type: "mobile" }
221
221
uap .getResult ().device ; // { vendor: "Nokia", model: "Lumia 635", type: "mobile" }
222
222
223
- uap .getDevice ().is (" mobile" ); // true
224
- uap .getDevice ().is (" Lumia 635" ); // true
225
- uap .getDevice ().is (" Nokia" ); // true
226
- uap .getDevice ().is (" iPhone" ); // false
223
+ let device = uap .getDevice ();
224
+ device .is (" mobile" ); // true
225
+ device .is (" Lumia 635" ); // true
226
+ device .is (" Nokia" ); // true
227
+ device .is (" iPhone" ); // false
227
228
uap .getResult ().device .is (" Nokia" ); // true
228
229
uap .getResult ().device .model ; // "Lumia 635"
229
230
0 commit comments