beez-ua
About
The library deside which browser has an access from UserAgent for node.js or browser. This library is Forked from zepto.js.
[INFO] This library supports only smartphone browser.[WARN] UserAgent support are planning to do at any time.
npm install (basic)
$ npm install beez-ua
Installing from source code
$ git clone https://github.com/CyberAgent/beez-ua.git$ cd beez-ua$ npm install . # install deps lib
installed via npm from github
$ npm install https://github.com/CyberAgent/beez-ua.git
Release files
$ ll releasebeez.ua.js [8.2kb] optimize nonebeez.ua.min.js [2.9kb] optimize uglify2
example
$ node> var beezua = ;undefined > beezuaVERSION'0.4.7'> beezuaundefined > beezua tab*2beezua__defineGetter__ beezua__defineSetter__ beezua__lookupGetter__ beezua__lookupSetter__ beezuaconstructor beezuahasOwnPropertybeezuaisPrototypeOf beezuapropertyIsEnumerable beezuatoLocaleString beezuatoString beezuavalueOf beezuaVERSION beezuaandroid beezuabb10 beezuablackberry beezuabrowser beezuachromebeezuads beezuafirefox beezuaipad beezuaiphone beezuakindle beezuaosbeezuaplaybook beezuaps3 beezuapsp beezuapsvita beezuarimtabletos beezuasafaribeezuasetup beezuasilk beezuatouchpad beezuawebkit beezuawebos beezuawiibeezuawindowsphone > beezuaos iphone: true ios: true version: '6.0' tablet: false phone: true > beezuabrowser webkit: true version: '536.26' > beezuaandroidnull> beezuaiphone 'iPhone OS 6_0' 'iPhone OS' '6_0' index: 25 input: 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25'
Requirements
test (browser)
$ cd beez-ua/$ open spec/index.html
test (node.js)
$ make test
build
$ make build
jshint
$ make jshint
jsdoc
$ make jsdoc$ open ./docs/index.html
plato
report$ make test #################### # -- target: test node_modules/mocha/bin/mocha test/test-*.js beez-ua ✓ window.nagigator.userAgent ✓ ua.Android 2.1 ✓ ua.Android 2.2 ✓ ua.Android 2.3 ✓ ua.Android 3.x ✓ ua.Android 4.x ✓ ua.iphone ✓ ua.iphone ✓ ua.iphone ✓ ua.iphone ✓ ua.iphone ✓ ua.iphone ✓ ua.iphone ✓ ua.iphone5 ✓ ua.blackberry ✓ ua.webos ✓ ua.touchpad ✓ ua.kindle ✓ ua.silk ✓ ua.bb10 ✓ ua.rimtabletos ✓ ua.playbook ✓ ua.ds ✓ ua.psp ✓ ua.psvita ✓ ua.windowsphone ✓ ua.safari ✓ ua.xbox 28 passing
Contributing
Reference Projects
Projects that incorporate some of the source code UserAgent zepto.js
Copyright
CyberAgent, Inc. All rights reserved.
LICENSE
@see : LICENSE
The MIT License (MIT)
Copyright © CyberAgent, Inc. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This library is forked from zepto.js that is MIT License