1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

fist commit

This commit is contained in:
Denis Demchenko
2017-04-04 23:03:47 +03:00
parent f93b3f1f1b
commit 575ba8076e
4 changed files with 398 additions and 0 deletions

28
src/parser.js Normal file
View File

@@ -0,0 +1,28 @@
var browsers = require('./parser-browsers');
class Parser {
constructor(UA) {
this._ua = UA;
this.result = {};
}
parseBrowser() {
if (this.result.browser) {
return this.result.browser;
}
const browser = browsers.find((browser) => {
return browser.test.some((result, item) => { item.test(this._ua)});
});
}
parseBrowserName() {}
parseBrowserVersion() {}
parsePlatform(){}
parseOS(){}
parseOSName(){}
parseOSVersion(){}
parseFullInfo(){}
}
module.exports = Parser;