Skip to content

Commit

Permalink
chore | read add as README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mcqua007 committed Apr 12, 2022
1 parent 9a87839 commit 8f74f8c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[comment]: <> (Badges from https://shields.io/ and https://badgen.net/)
[comment]: <> (JsBin Original Template - https://jsbin.com/yevusevahu/edit?html,output)
## Quantdom JS
![npm bundle size](https://img.shields.io/bundlephobia/min/quantdom?color=%234338ca&logoColor=%232a2b2c) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/quantdom?color=%234338ca&label=gzipped%20size&logoColor=%232a2b2c) ![NPM](https://img.shields.io/npm/l/quantdom?color=%234338ca&logoColor=%232a2b2c)

Quantdom is a very small (about 600 bytes when ran through [terser](https://www.npmjs.com/package/terser) & gzipped) dom danipulation library that uuses a Jquery like syntax and supports chaining but is only comprised of the most commonly used Jquery functions.

Made for working with the dom less verbose without all the bloat from jQuery. I chose to base it off of Jquery's syntax as many developers are already familar with it and it is very concise. This library is meant to be as small as possible (without being unreadble) so when you need to directly interact with the DOM you can use this library on top of a larger framework without extra bloat that you don't need.

***Why the name, QuantDOM ?***
Taken from [Wikipedia's *Quantum* article](https://en.wikipedia.org/wiki/Quantum), *"In physics, a quantum (plural quanta) is the minimum amount of any physical entity (physical property) involved in an interaction."* This fit the goal of this project in the way Quantdom is made to reduce the effort when having to deal directly with the DOM.

**Optional Chaining:** `$('.modal').show().addClass('active-overlay');`

## Getting Started

### Install via NPM
1. Install using npm ` npm i quantdom` or with yarn `yarn add quantdom`
2. Then import into project using `import q from 'quantdom'` or use the jQuery popularized $ as your function name. i.e. `import $ from 'quantdom'`

### Install via CDN

1. Use latest version [https://cdn.jsdelivr.net/npm/quantdom](https://cdn.jsdelivr.net/npm/quantdom/dist/quantdom.min.js) or specify a certain version [https://cdn.jsdelivr.net/npm/[email protected]/dist/quantdom.min.js](https://cdn.jsdelivr.net/npm/[email protected]/dist/quantdom.min.js)

```
<script src="https://cdn.jsdelivr.net/npm/quantdom"></script>
```
2. Then start using ex. `$('.drop-down').attr('aria-expanded', 'true')`
### Try it Out!
- Fork the below playground by clicking th New Bin button and start editing!
- [Go to JSBin Playground](https://jsbin.com/yevusevahu/edit?html,output)
### Documentation
*View generated [documentation](docs.md)*

0 comments on commit 8f74f8c

Please sign in to comment.