bowser 2.5.3 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/bundled.js +1 -1
- package/bundled.js.gz +0 -0
- package/es5.js +1 -1
- package/es5.js.gz +0 -0
- package/package.json +21 -19
- package/src/constants.js +6 -0
- package/src/parser-browsers.js +30 -0
- package/src/parser-platforms.js +1 -1
- package/docs/Bowser.html +0 -505
- package/docs/BowserUAIsNotAStringError.html +0 -234
- package/docs/Parser.html +0 -3074
- package/docs/bowser.js.html +0 -146
- package/docs/global.html +0 -2365
- package/docs/index.html +0 -203
- package/docs/parser.js.html +0 -559
- package/docs/scripts/collapse.js +0 -20
- package/docs/scripts/jquery-3.1.1.min.js +0 -4
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/nav.js +0 -12
- package/docs/scripts/polyfill.js +0 -4
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/scripts/search.js +0 -83
- package/docs/styles/jsdoc.css +0 -671
- package/docs/styles/prettify.css +0 -79
- package/docs/utils.js.html +0 -328
package/docs/Bowser.html
DELETED
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<title>Bowser - Documentation</title>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<script src="scripts/prettify/prettify.js"></script>
|
|
10
|
-
<script src="scripts/prettify/lang-css.js"></script>
|
|
11
|
-
<!--[if lt IE 9]>
|
|
12
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
13
|
-
<![endif]-->
|
|
14
|
-
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
|
-
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
|
-
<script src="scripts/nav.js" defer></script>
|
|
17
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
|
|
21
|
-
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
22
|
-
<label for="nav-trigger" class="navicon-button x">
|
|
23
|
-
<div class="navicon"></div>
|
|
24
|
-
</label>
|
|
25
|
-
|
|
26
|
-
<label for="nav-trigger" class="overlay"></label>
|
|
27
|
-
|
|
28
|
-
<nav >
|
|
29
|
-
|
|
30
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Bowser.html">Bowser</a><ul class='methods'><li data-type='method'><a href="Bowser.html#.getParser">getParser</a></li><li data-type='method'><a href="Bowser.html#.parse">parse</a></li></ul></li><li><a href="Parser.html">Parser</a><ul class='methods'><li data-type='method'><a href="Parser.html#getBrowser">getBrowser</a></li><li data-type='method'><a href="Parser.html#getBrowserName">getBrowserName</a></li><li data-type='method'><a href="Parser.html#getBrowserVersion">getBrowserVersion</a></li><li data-type='method'><a href="Parser.html#getEngine">getEngine</a></li><li data-type='method'><a href="Parser.html#getEngineName">getEngineName</a></li><li data-type='method'><a href="Parser.html#getOS">getOS</a></li><li data-type='method'><a href="Parser.html#getOSName">getOSName</a></li><li data-type='method'><a href="Parser.html#getOSVersion">getOSVersion</a></li><li data-type='method'><a href="Parser.html#getPlatform">getPlatform</a></li><li data-type='method'><a href="Parser.html#getPlatformType">getPlatformType</a></li><li data-type='method'><a href="Parser.html#getResult">getResult</a></li><li data-type='method'><a href="Parser.html#getUA">getUA</a></li><li data-type='method'><a href="Parser.html#is">is</a></li><li data-type='method'><a href="Parser.html#isBrowser">isBrowser</a></li><li data-type='method'><a href="Parser.html#parse">parse</a></li><li data-type='method'><a href="Parser.html#parseBrowser">parseBrowser</a></li><li data-type='method'><a href="Parser.html#parseEngine">parseEngine</a></li><li data-type='method'><a href="Parser.html#parseOS">parseOS</a></li><li data-type='method'><a href="Parser.html#parsePlatform">parsePlatform</a></li><li data-type='method'><a href="Parser.html#satisfies">satisfies</a></li><li data-type='method'><a href="Parser.html#some">some</a></li><li data-type='method'><a href="Parser.html#test">test</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#getAndroidVersionName">getAndroidVersionName</a></li><li><a href="global.html#getBrowserAlias">getBrowserAlias</a></li><li><a href="global.html#getBrowserTypeByAlias">getBrowserTypeByAlias</a></li><li><a href="global.html#getFirstMatch">getFirstMatch</a></li><li><a href="global.html#getMacOSVersionName">getMacOSVersionName</a></li><li><a href="global.html#getSecondMatch">getSecondMatch</a></li><li><a href="global.html#getVersionPrecision">getVersionPrecision</a></li><li><a href="global.html#map">map</a></li><li><a href="global.html#matchAndReturnConst">matchAndReturnConst</a></li></ul>
|
|
31
|
-
</nav>
|
|
32
|
-
|
|
33
|
-
<div id="main">
|
|
34
|
-
|
|
35
|
-
<h1 class="page-title">Bowser</h1>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<section>
|
|
44
|
-
|
|
45
|
-
<header>
|
|
46
|
-
|
|
47
|
-
<h2>
|
|
48
|
-
Bowser
|
|
49
|
-
</h2>
|
|
50
|
-
|
|
51
|
-
<div class="class-description"><p>Bowser is a static object, that provides an API to the Parsers</p></div>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</header>
|
|
55
|
-
|
|
56
|
-
<article>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<h3 class="subsection-title">Methods</h3>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<h4 class="name" id=".getParser"><span class="type-signature">(static) </span>getParser<span class="signature">(UA, skipParsing<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="Parser.html">Parser</a>}</span></h4>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<dl class="details">
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<dt class="tag-source">Source:</dt>
|
|
92
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
93
|
-
<a href="bowser.js.html">bowser.js</a>, <a href="bowser.js.html#line40">line 40</a>
|
|
94
|
-
</li></ul></dd>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</dl>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<div class="description">
|
|
133
|
-
<p>Creates a <a href="Parser.html">Parser</a> instance</p>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<h5>Example</h5>
|
|
145
|
-
|
|
146
|
-
<pre class="prettyprint"><code>const parser = Bowser.getParser(window.navigator.userAgent);
|
|
147
|
-
const result = parser.getResult();</code></pre>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<h5>Parameters:</h5>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
<table class="params">
|
|
156
|
-
<thead>
|
|
157
|
-
<tr>
|
|
158
|
-
|
|
159
|
-
<th>Name</th>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<th>Type</th>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<th>Attributes</th>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<th>Default</th>
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<th class="last">Description</th>
|
|
173
|
-
</tr>
|
|
174
|
-
</thead>
|
|
175
|
-
|
|
176
|
-
<tbody>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<tr>
|
|
180
|
-
|
|
181
|
-
<td class="name"><code>UA</code></td>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
<td class="type">
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<span class="param-type">String</span>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
<td class="attributes">
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
</td>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<td class="default">
|
|
205
|
-
|
|
206
|
-
</td>
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<td class="description last"><p>UserAgent string</p></td>
|
|
210
|
-
</tr>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
<tr>
|
|
215
|
-
|
|
216
|
-
<td class="name"><code>skipParsing</code></td>
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<td class="type">
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
<span class="param-type">Boolean</span>
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
</td>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<td class="attributes">
|
|
230
|
-
|
|
231
|
-
<optional><br>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
</td>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<td class="default">
|
|
242
|
-
|
|
243
|
-
<code>false</code>
|
|
244
|
-
|
|
245
|
-
</td>
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
<td class="description last"><p>Will make the Parser postpone parsing until you ask it
|
|
249
|
-
explicitly. Same as <code>skipParsing</code> for <a href="Parser.html">Parser</a>.</p></td>
|
|
250
|
-
</tr>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
</tbody>
|
|
254
|
-
</table>
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
<h5>Throws:</h5>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<dl>
|
|
274
|
-
<dt>
|
|
275
|
-
<div class="param-desc">
|
|
276
|
-
<p>when UA is not a String</p>
|
|
277
|
-
</div>
|
|
278
|
-
</dt>
|
|
279
|
-
<dd></dd>
|
|
280
|
-
<dt>
|
|
281
|
-
<dl class="param-type">
|
|
282
|
-
<dt>
|
|
283
|
-
Type
|
|
284
|
-
</dt>
|
|
285
|
-
<dd>
|
|
286
|
-
|
|
287
|
-
<span class="param-type">Error</span>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</dd>
|
|
291
|
-
</dl>
|
|
292
|
-
</dt>
|
|
293
|
-
<dd></dd>
|
|
294
|
-
</dl>
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
<h5>Returns:</h5>
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
<dl class="param-type">
|
|
306
|
-
<dt>
|
|
307
|
-
Type
|
|
308
|
-
</dt>
|
|
309
|
-
<dd>
|
|
310
|
-
|
|
311
|
-
<span class="param-type"><a href="Parser.html">Parser</a></span>
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
</dd>
|
|
315
|
-
</dl>
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
<h4 class="name" id=".parse"><span class="type-signature">(static) </span>parse<span class="signature">(UA)</span><span class="type-signature"> → {<a href="global.html#ParsedResult">ParsedResult</a>}</span></h4>
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<dl class="details">
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
<dt class="tag-source">Source:</dt>
|
|
337
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
338
|
-
<a href="bowser.js.html">bowser.js</a>, <a href="bowser.js.html#line56">line 56</a>
|
|
339
|
-
</li></ul></dd>
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
</dl>
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
<div class="description">
|
|
378
|
-
<p>Creates a <a href="Parser.html">Parser</a> instance and runs Parser.getResult immediately</p>
|
|
379
|
-
</div>
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<h5>Example</h5>
|
|
390
|
-
|
|
391
|
-
<pre class="prettyprint"><code>const result = Bowser.parse(window.navigator.userAgent);</code></pre>
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
<h5>Parameters:</h5>
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
<table class="params">
|
|
400
|
-
<thead>
|
|
401
|
-
<tr>
|
|
402
|
-
|
|
403
|
-
<th>Name</th>
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
<th>Type</th>
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
<th class="last">Description</th>
|
|
413
|
-
</tr>
|
|
414
|
-
</thead>
|
|
415
|
-
|
|
416
|
-
<tbody>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
<tr>
|
|
420
|
-
|
|
421
|
-
<td class="name"><code>UA</code></td>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
<td class="type">
|
|
425
|
-
|
|
426
|
-
</td>
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
<td class="description last"></td>
|
|
433
|
-
</tr>
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
</tbody>
|
|
437
|
-
</table>
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
<h5>Returns:</h5>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
<dl class="param-type">
|
|
460
|
-
<dt>
|
|
461
|
-
Type
|
|
462
|
-
</dt>
|
|
463
|
-
<dd>
|
|
464
|
-
|
|
465
|
-
<span class="param-type"><a href="global.html#ParsedResult">ParsedResult</a></span>
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
</dd>
|
|
469
|
-
</dl>
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
</article>
|
|
482
|
-
|
|
483
|
-
</section>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
</div>
|
|
491
|
-
|
|
492
|
-
<br class="clear">
|
|
493
|
-
|
|
494
|
-
<footer>
|
|
495
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Sun Aug 04 2019 23:53:02 GMT+0300 (Eastern European Summer Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
496
|
-
</footer>
|
|
497
|
-
|
|
498
|
-
<script>prettyPrint();</script>
|
|
499
|
-
<script src="scripts/polyfill.js"></script>
|
|
500
|
-
<script src="scripts/linenumber.js"></script>
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
</body>
|
|
505
|
-
</html>
|