npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

beez-ua

v1.0.5

Published

The library deside which browser has an access from UserAgent for node.js or browser. This library is Forked from zepto.js.

Downloads

13

Readme

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 release
beez.ua.js (size: 8220 byte)[8.2kb] optimize none
beez.ua.min.js (size: 2957 byte)[2.9kb] optimize uglify2

example


$ node
> var beezua = require('beez-ua');
undefined

> beezua.VERSION
'0.4.7'
> beezua.setup('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')
undefined

> beezua. [tab*2]
beezua.__defineGetter__      beezua.__defineSetter__      beezua.__lookupGetter__      beezua.__lookupSetter__      beezua.constructor           beezua.hasOwnProperty
beezua.isPrototypeOf         beezua.propertyIsEnumerable  beezua.toLocaleString        beezua.toString              beezua.valueOf

beezua.VERSION               beezua.android               beezua.bb10                  beezua.blackberry            beezua.browser               beezua.chrome
beezua.ds                    beezua.firefox               beezua.ipad                  beezua.iphone                beezua.kindle                beezua.os
beezua.playbook              beezua.ps3                   beezua.psp                   beezua.psvita                beezua.rimtabletos           beezua.safari
beezua.setup                 beezua.silk                  beezua.touchpad              beezua.webkit                beezua.webos                 beezua.wii
beezua.windowsphone

> beezua.os
{ iphone: true,
  ios: true,
  version: '6.0',
  tablet: false,
  phone: true }
> beezua.browser
{ webkit: true, version: '536.26' }
> beezua.android
null
> beezua.iphone
[ '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

report plato

$ 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 (IOS4)
    ✓ ua.iphone (IOS5)
    ✓ ua.iphone (IOS6)
    ✓ ua.iphone (IOS7)
    ✓ ua.iphone (IOS4-ipad)
    ✓ ua.iphone (IOS5-ipad)
    ✓ ua.iphone (IOS6-ipad)
    ✓ ua.iphone5 (hardware)
    ✓ 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 (29ms)

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

Bitdeli Badge