UNPKG
ua2os
Version:
latest (2.0.2)
2.0.2
2.0.1
2.0.0
1.0.0
Detect the OS from a User-Agent string.
github.com/fabiospampinato/ua2os
fabiospampinato/ua2os
ua2os
/
dist
/
index.js
9 lines
(8 loc)
•
176 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
/* IMPORT */
import
Re
from
'./re.js'
;
/* MAIN */
const
ua2os
= (
ua
) => {
return
Re
.
order
.
find
(
os
=>
Re
[os].
find
(
re
=>
re.
test
(ua))); };
/* EXPORT */
export
default
ua2os;