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
- Host: GitHub
- URL: https://github.com/shadowtime2000/easy-dom
- Owner: shadowtime2000
- License: mit
- Created: 2020-10-03T21:41:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-07T22:36:42.000Z (over 5 years ago)
- Last Synced: 2025-02-05T08:50:33.561Z (over 1 year ago)
- Language: JavaScript
- Size: 76.2 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!