Yea, let's bury jQuery again and make more "helpers.js" [1]

    export function extend(src) {
      var obj, args = arguments
      
      for (let i = 1; i < args.length; ++i) {
        if (obj = args[i]) {
          for (let key in obj) {
            // check if this property of the source object could be overridden
            if (isWritable(src, key))
              src[key] = obj[key]
          }
        }
      }
     }
or just add super-unique stuff to our classes [2]

    DragSelect.prototype.removeClass = function( element, classname ) {    
      var cn = element.className;
      var rxp = new RegExp( classname + \'\\b\', \'g\' );
      cn = cn.replace( rxp, \'\' );
      element.className = cn;
      return element;    
    };
    
    DragSelect.prototype.hasClass = function( element, classname ) {    
      var cn = element.className;
      if( cn.indexOf( classname ) > -1 ) { return true; }
      else { return false; }    
    };
or write tons of boilerplate code like

    if (typeof element === 'string') {
        owner.element = document.querySelector(element);
    } else {
        owner.element = ((typeof element.length !== 'undefined') && element.length > 0) ? element[0] : element;
    }
(mmm, it's so vanilla)

[1] https://github.com/oncode/handorgel/blob/master/src/helpers....

[2] https://github.com/ThibaultJanBeyer/DragSelect/blob/master/s...

Your JS knowledge appears to be severely outdated. Instead of the first you can now write:

    Object.assign(target, object1, objectN);
The second:

    element.classList.add(className);
    element.classList.contains(className);
And the third has been fixed at a community level, as we've learned the value of API strictness, obviating such checks.

I don't think anybody was against jQuery back when the alternative was helper functions, I certainly wasn't. But that's five years ago at this point. Modern JavaScript looks nothing like the code you posted, it's actually been built up into a pretty good language.

Are you absolutely certain that everything that jQuery does can now be done in a clear and concise way using plain Javascript? I've written some fairly complex jQuery selector over the years, perhaps I'm wrong but I something tells me that while the simple use cases can be done with plain old js the more complex selectors might not be so easy.

I find this debate so aggravating. I'm glad you can do some of the stuff jQuery does using modern vanilla js. Perhaps jQuery is overkill for doing one hide/show (or toggle) action on the page. But what about the more complex stuff. What is primary motivation behind this nagging issue, of the load time of jQuery?

I suspect it is that many developers have some obsession over shaving a few milliseconds on their load time. For jQuery? One library? Is it that bad that you need to write vanilla js? So you can save a few milliseconds?

Can you have a sophisticated selector for Event Delegation without using jQuery but make the code concise and easy to read? What about child selectors ("ul.thisClass > li.thatClass" > span.otherClass").

I like jQuery because the syntax makes sense, its clear and concise, you can do complex things with less code. Maybe some of the new stuff can be clean and concise and easy to read, but all of it? I have my doubts.

> Are you absolutely certain that everything that jQuery does can now be done in a clear and concise way using plain Javascript?

Can you give us some examples of things that you're worried can't be written clearly using plain JS? Obviously everything you can do with jquery you can do without jquery. Its just a library.

> Can you have a sophisticated selector for Event Delegation without using jQuery but make the code concise and easy to read?

What do you mean by event delegation in this context?

> What about child selectors ("ul.thisClass > li.thatClass" > span.otherClass")

document.querySelector / querySelectorAll supports this. Its available in all browsers on all platforms if thats how you chose to make web apps: http://caniuse.com/#feat=queryselector

Make an HTTP request. Parse the JSON body if a 200, otherwise log an error.

I haven't tested it but I think this should work:

fetch(url)

.then(res => res.status === 200 ? res.json() : Promise.reject(res))

.then(data => { ... })

And the Fetch API, has, according to caniuse[1], 76% support. I don't know that I can disregard 1 out of every 4 users, hence, jQuery.

For some things, like those mentioned by twhb, where support is >90%, sure, ditch the library and use the supported stuff. But I don't think all of jQuery is that well supported, yet, and/or has as decent an interface.

[1]: https://caniuse.com/#search=fetch

I suppose. Or just use a polyfill for old browsers. It increases your code size a little, but at least the bloat is temporary.

https://github.com/github/fetch or https://www.npmjs.com/package/fetch-ie8