mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
refactor(bowser): replace static properties with getters
This commit is contained in:
@@ -51,11 +51,22 @@ class Bowser {
|
|||||||
static parse(UA) {
|
static parse(UA) {
|
||||||
return (new Parser(UA)).getResult();
|
return (new Parser(UA)).getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get BROWSER_MAP() {
|
||||||
|
return BROWSER_MAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get ENGINE_MAP() {
|
||||||
|
return ENGINE_MAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get OS_MAP() {
|
||||||
|
return OS_MAP;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get PLATFORMS_MAP() {
|
||||||
|
return PLATFORMS_MAP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Bowser.BROWSER_MAP = BROWSER_MAP;
|
|
||||||
Bowser.ENGINE_MAP = ENGINE_MAP;
|
|
||||||
Bowser.OS_MAP = OS_MAP;
|
|
||||||
Bowser.PLATFORMS_MAP = PLATFORMS_MAP;
|
|
||||||
|
|
||||||
export default Bowser;
|
export default Bowser;
|
||||||
|
|||||||
Reference in New Issue
Block a user