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

luseragent

v0.8.1

Published

Human-friendly user agent information

Downloads

3

Readme

L'user Agent

Pardon my French?

So I guess it's cute but most days I really don't give a about all this browser user agent detritus.

I just want to know which browser, which version, which operating system.

Usage

var ua = luserAgent(navigator.userAgent);
console.log("Hello "+ua.app+" "+ua.v+", on "+ua.os);
console.log(", world.");

You can drop the semi-colons or put them at the beginning of your lines or whatever if you're annoying like that, but honestly I'd rather you just use CoffeeScript at that point.

Eventually when I need it this will work as a CommonJS (node.js/CouchDB/browserify) module too. Right now I sometimes just copy/paste the code into my projects because that is awesome also*.

WARNING

PLEASE: if you use this for browser detection you yes you Are The Reason we got this mess in the first place and I will cry. For you Argentina.

Exceptions.

If all of the following are true:

  • you are not using jQuery, and
  • you have heard of Modernizr, and
  • you have filed a bug for the browser bug you are fighting

Then you may use the provided information to gaurd a carefully considered workaround for said browser bug.

Else you may only use this library for human consumption (e.g. reable browser info for statitics or exception logs)

Related work

c.f. http://www.quirksmode.org/js/detect.html and http://www.javascripter.net/faq/browsern.htm probably many many others but I got sick of not being able to find them

https://developer.mozilla.org/en-US/docs/Browser_Detection_and_Cross_Browser_Support http://www.useragentstring.com/pages/links.php / http://www.useragentstring.com/pages/All/ http://tools.ietf.org/html/rfc2616#section-14.43

Fine print

* so I really don't recommend just copy-pasting this into your project because my code here can only improve, but I also really don't care.

License: this but © me and I guess whoever else helped instead of that Sam dude. I don't even know that Sam dude.

Rhetorically asked questions

Dare I submit a pull request or even fork this you seem really rude.

And you hate jQuery? WHO HATES JQUERY IT IS THE WEB?!!!

But I love you.