DEV Community

Cover image for Lamest javascript library ever! πŸ™Œ
Akhil Arjun
Akhil Arjun

Posted on

4 1

Lamest javascript library ever! πŸ™Œ

This is my first post, and I chose that title for a very specific purpose.

I always believed in learning by practice and for the same reason, I built a lot of redundant small libraries which were basically rip-offs.

One of such library is detectoldbrowsers.js. Which does exactly what the name suggests. It lets you know if you are running on an old browser and allows you to take a procedural decision.

All you have to do is

if(!isBrowserOld()){
  // Do your new browser thingy!
}
Enter fullscreen mode Exit fullscreen mode

The library was only a few lines long and had a size of 448B when minified and gzipped.

But, even after all of this, I ended up using that library in two of my projects and it served the purpose. It still performs flawlessly and will forever be part of those projects and be my contribution πŸ˜‰.

I developed this small library around June 2016 and revisited it this year. I had learned a lot more than I knew back in the time so, I figured why not upgrade this small guy.

So I went ahead created a new landing page and hosted the library using jsdelivr.

https://cdn.jsdelivr.net/gh/akhilarjun/detectOldBrowser.js@v1.0/js/detectOldBrowser.min.js

The moral here is no matter how small the effort looks like, how in-consequential it feels like there is always something to learn from it.

End of the day it isn't the lamest library ever, right? 🀞

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (2)

Collapse
 
pentacular profile image
pentacular β€’

So, what's the criteria for being an old browser? :)

Collapse
 
ludamillion profile image
Luke Inglis β€’

Apparently this

var minimum = {
    IE : 11,
    CHROME : 50,
    FIREFOX : 46,
    SAFARI : 5,
    OPERA : 37
};

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay