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

@zenoo/light-query

v1.2.6

Published

A lightweight jQuery alternative

Downloads

8

Readme

LightQuery - 10 times smaller than jQuery (90kB => 9kB)

This is a complete rewrite of the well-known jQuery library.

Every method has been rewritten or replaced by another method.

Doc

See the documentation for more

  • Installation

Simply import light-query.min.js into your HTML by downloading it or using a CDN.

<script src="https://gitcdn.link/repo/Zenoo/LightQuery/master/light-query.min.js"></script>	
  • Usage

  • Initialize your object like you would in jQuery using $:

$(selector[, context])

// Example
let elements = $('yo.ur[selec="tor"]');
let elementsWithContext = $('yo.ur[selec="tor"]', section);
  • If you need to wait for the document to be loaded, use:
$(() => {
  // The document is loaded here
});

// OR

$(function(){
  // The document is loaded here
});
  • The LightQuery object extends the native Array object, so you can use all of its methods/properties.
// Examples
$('p').length;
$('p')[0];
$('p').map(...);
  • Methods

The full API documentation is available on https://zenoo.github.io/LightQuery/.

  • .add()

  • .addClass()

  • .after()

  • .append()

  • .appendTo()

  • .before()

  • .blur()

  • .children()

  • .clone()

  • .closest()

  • .css()

  • .detach()

  • .each()

  • .empty()

  • .eq()

  • .filter(callback) The callback follows function(item, index){ ... }

  • .first()

  • .get()

  • .has()

  • .hasClass()

  • .height()

  • .hide()

  • .html()

  • .index()

  • .insertAfter()

  • .insertBefore()

  • .is()

  • $.ajax() Uses AjaxSender

  • $.get() $.ajax() shorthand for simple GET requests

  • $.insert()

  • .last()

  • .next()

  • .nextAll()

  • .not()

  • .off()

  • .offset()

  • .parent()

  • .parents()

  • .prepend()

  • .prependTo()

  • .prev()

  • .prevAll()

  • .remove()

  • .removeAttr()

  • .removeClass()

  • .replaceAll()

  • .replaceWith()

  • .scrollLeft()

  • .scrollTop()

  • .serialize()

  • .serializeArray()

  • .show()

  • .siblings()

  • .slice()

  • .text()

  • .toggle()

  • .toggleClass()

  • .trigger()

  • .unwrap()

  • .val()

  • .width()

  • .wrap()

  • .wrapAll()

  • Not included

    • .addBack() Use more appropriate selectors instead
    • .ajaxComplete() Use $.ajax() instead
    • .ajaxError() Use $.ajax() instead
    • .ajaxSend() Use $.ajax() instead
    • .ajaxStart() Use $.ajax() instead
    • .ajaxStop() Use $.ajax() instead
    • .ajaxSuccess() Use $.ajax() instead
    • .andSelf() Use more appropriate selectors instead
    • .animate() Use CSS3 animations instead
    • .change() Use .on('change') or .trigger('change') instead
    • .clearQueue() There is no queue
    • .click() Use .on('click') or .trigger('click') instead
    • .data() Use .attr('data-...') instead
    • .dblclick() Use .on('dblclick') or .trigger('dblclick') instead
    • .delay() Use setTimeout() or CSS3 animations instead
    • .delegate() Use .on() instead
    • .dequeue() There is no queue
    • .die() Use .off() instead
    • .end() Use another query instead
    • .error() Use .on('error') instead
    • .fadeIn() Use classes and CSS transitions instead
    • .fadeOut() Use classes and CSS transitions instead
    • .fadeTo() Use classes and CSS transitions instead
    • .fadeToggle() Use classes and CSS transitions instead
    • .finish() Use CSS3 animations instead
    • .focus() Use .on('focus') or .trigger('focus') instead
    • .focusin() Use .on('focusin') instead
    • .focusout() Use .on('focusout') instead
    • .hover() Use .on('mouseenter') and .on('mouseleave') instead
    • .innerHeight() Use .height() instead
    • .innerWidth() Use .width() instead
    • $.each() Use for ... of or .forEach() instead
    • $.extend() Use Object.assign() instead
    • $.fn.extend() Use _$.prototype.XXX instead
    • $.getJSON() Use $.ajax() instead
    • $.getScript() Use $.ajax() instead
    • $.globalEval() Use proper coding instead
    • $.post() Use $.ajax() instead
    • .queue() There is no queue
    • .keydown() Use .on('keydown') or .trigger('keydown') instead
    • .keypress() Use .on('keypress') or .trigger('keypress') instead
    • .keyup() Use .on('keyup') or .trigger('keyup') instead
    • .live() Use .on() instead
    • .load() Use $.ajax() and .html() instead
    • .mousedown() Use .on('mousedown') or .trigger('mousedown') instead
    • .mouseenter() Use .on('mouseenter') or .trigger('mouseenter') instead
    • .mouseleave() Use .on('mouseleave') or .trigger('mouseleave') instead
    • .mousemove() Use .on('mousemove') or .trigger('mousemove') instead
    • .mouseout() Use .on('mouseout') or .trigger('mouseout') instead
    • .mouseover() Use .on('mouseover') or .trigger('mouseover') instead
    • .mouseup() Use .on('mouseup') or .trigger('mouseup') instead
    • .nextUntil() Use better queries instead
    • .offsetParent() Why would you ever need this
    • .one() Use .on() and .off() instead
    • .outerHeight() Use .height() and .css() instead
    • .outerWidth() Use .width() and .css() instead
    • .parentsUntil() Use .parents() and .not() instead
    • .prevUntil() Use better queries instead
    • .promise() There is no queue
    • .prop() Use .attr() instead
    • .pushStack() There is no stack
    • .queue() There is no queue
    • .ready() Use $(function(){ ... }) or $(() => { ... }) instead
    • .removeData() Use .removeAttr() instead
    • .removeProp() Use .removeAttr() instead
    • .resize() Use .on('resize') or .trigger('resize') instead
    • .scroll() Use .on('scroll') or .trigger('scroll') instead
    • .select() Use .on('select') or .trigger('select') instead
    • .size() Use .length instead
    • .slideDown() Use classes and CSS transitions instead
    • .slideToggle() Use classes and CSS transitions instead
    • .slideUp() Use classes and CSS transitions instead
    • .stop() Use CSS3 animations instead
    • .submit() Use .on('submit') or .trigger('submit') instead
    • .toArray() Use .get() instead
    • .triggerHandler() Use .trigger() instead
    • .unbind() Use .off() instead
    • .undelegate() Use .off() instead
    • .unload() Use .on('unload') instead
    • .wrapInner() Use .children().wrapAll() instead

Authors