Skip to content

KooiInc/JQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JQL

This module (JQueryLike) was inspired by the idea that some JQuery was too good to ditch.

It is developed in a modular fashion and uses plain ES20xx, so not really (or really not, take your pick) suitable for older browsers.

The module was rewritten in 2023 in a classfree object oriented fashion, inspired by a Douglas Crockford presentation.

The objective is to use prototype and this as least as possible in the code.

Install/Import/Initialize

NPM

You can install this module using npm

npm i jqlmodule

There are two flavors of this library. One for scripts with type module (or projects with "type": "module" in package.json) and one for the browser.

For each flavor, the script is (bundled and) minified. The location of the minified scripts is https://kooiinc.github.io/JQL/Bundle

ESM import

import $ from "https://kooiinc.github.io/JQL/Bundle/jql.min.js";
// or
const $ = ( await 
  import("https://kooiinc.github.io/JQL/Bundle/jql.min.js") 
).default;
$.div(`Hello JQL!`);
// ...

Browser script

<script src="https://kooiinc.github.io/JQL/Bundle/jql.browser.min.js"></script>
<script>
  const $ = JQL.default;
  // optionally delete from global namespace
  delete window.JQL;
  $.div(`Hello JQL!`);
  // ...
</script>

Documentation

Documentation can be found @kooiinc.github.io/JQL/Resource/Docs/.

Demo and test

A test and demo of this module can be found @kooiinc.github.io/JQL/Resource/Demo.