JSPM

tinyj

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q28786F
  • License MIT

Warning - this is not built or in any way endorsed by the Jquery team. A short succinct version of jquery, probably not everything you'd like, but sufficient for small implementations.

Package Exports

  • tinyj

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tinyj) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tinyJ

Warning - This is not in any way endorsed, created, coded, built or otherwise made by the Jquery Team. If you are looking for the official jquery product please go to the official jquery website.

TinyJ - a short, succinct DOM interactions library inspired by Jquery.

It doesn't have all the features that Jquery has and certainly no plugins, but minified and zipped it comes down to (TODO: update minified data) and it has the core features that JQuery has. You'll also find that a lot of the syntax is quite similar.

Usage

In plain HTML

<script src="https://unpkg.com/tinyJ/tinyJ.js"></script>
<script>
    $('#paragraph').html('Hello World!')
</script>

If you're reading this from the npm page you might want to use TinyJ for React (coming soon)

import react from 'react'
import $ from 'tinyJ'
ReactDOM.render(
    <p id="example">
    Hello...
    </p>
)
$('#example').html('...world!')

As of 0.1.0 only a small subset of CSS selectors are supported:

  • #idname
  • .classname
  • tagname

You can also use $.ajax very simply:

<script src="https://unpkg.com/tinyJ/tinyJ.js"> </script>
<script>
$.ajax("url here").then(function(res, err) {
    // Do something with the response
})
</script>

See the changelog for more information.

Development

Hooray! You want to help?

Here's a few guidelines: We have some git hooks installed, however for a cleaner experience in this dimension, we recommend you install VScode, which has the necessary extensions outlined below:-

  1. vivaxy.vscode-conventional-commits . . .