An open API service indexing awesome lists of open source software.

https://github.com/shadowtime2000/easy-dom

Small yet powerful package to make manipulating the DOM 5 characters smaller
https://github.com/shadowtime2000/easy-dom

Last synced: about 1 year ago
JSON representation

Small yet powerful package to make manipulating the DOM 5 characters smaller

Awesome Lists containing this project

README

          

easy-dom


Small yet powerful package to make manipulating the DOM 5 characters smaller

## Installation

Put this in your `` tag:

```html

```

You have now imported `easy-dom` into your website! And don't worry about file size! `easy-dom` is around 20 bytes, and the script tag is around 89 bytes, totalling 109 bytes added to your website!

### Usage

Just replace every reference to `document` with `DOM`.

#### Advantages

If you replace a reference to `document` with `DOM`, you save around 5 bytes. That means, if you have 22 `document` references, instead of adding 109 bytes to your website, you are decreasing the size by 1 byte. So if you have more than 22, you decrease the size by even more!
But let me give you some bigger numbers:
If
- `jquery` started using this they would reduce their bundle size by over 1kb!
- `react` started using this they would reduce their bundle size by 1.3kb!
- `angular` started using this they would reduce their bundle size by 2.3kb!