You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-21Lines changed: 9 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,39 +5,24 @@
5
5
6
6
# Cash
7
7
8
-
*An absurdly small jQuery alternative for modern browsers (IE10+)*
9
-
10
-
Cash is a small library for modern browsers (IE10+) that provides jQuery-style syntax for manipulating the DOM. Utilizing modern browser features to minimize the codebase, developers can use the familiar chainable methods at a fraction of the file size. 100% feature parity with jQuery isn't a goal, but cash comes helpfully close, covering most day to day use cases.
8
+
Cash is an absurdly small jQuery alternative for modern browsers (IE10+) that provides jQuery-style syntax for manipulating the DOM. Utilizing modern browser features to minimize the codebase, developers can use the familiar chainable methods at a fraction of the file size. 100% feature parity with jQuery isn't a goal, but cash comes helpfully close, covering most day to day use cases.
An **85%** gain in size reduction. If you need a smaller file, partial builds are supported too since this project is bundled using [pacco](https://github.com/fabiospampinato/pacco).
21
-
22
-
#### Partial Builds
23
-
24
-
Some alternative configuration files for [pacco](https://github.com/fabiospampinato/pacco) for generating partial builds are available [here](https://github.com/kenwheeler/cash/tree/master/resources/pacco).
16
+
| Minified & Gzipped |**4.5 KB**| 30.3 KB |
25
17
26
-
Let's compare the size of those partial builds (you could actually exclude individual methods and get even smaller builds):
An **85%** gain in size reduction. If you need a smaller bundle, we support [partial builds](https://github.com/kenwheeler/cash/blob/master/docs/partial_builds.md) too.
34
19
35
20
## Usage
36
21
37
-
Get cash from [CloudFlare](https://cdnjs.cloudflare.com/ajax/libs/cash/2.1.3/cash.min.js) or [jsDelivr](https://cdn.jsdelivr.net/npm/cash-dom@2.1.3/dist/cash.min.js) and use it like this:
22
+
Get cash from [CloudFlare](https://cdnjs.cloudflare.com/ajax/libs/cash/2.3.2/cash.min.js) or [jsDelivr](https://cdn.jsdelivr.net/npm/cash-dom@2.3.2/dist/cash.min.js) and use it like this:
@@ -47,12 +32,15 @@ Get cash from [CloudFlare](https://cdnjs.cloudflare.com/ajax/libs/cash/2.1.3/cas
47
32
```
48
33
49
34
Cash is also available through [NPM](http://npmjs.com) as the [`cash-dom`](https://www.npmjs.com/package/cash-dom) package:
50
-
```
35
+
36
+
```sh
51
37
npm install cash-dom --save-dev
52
38
```
53
39
54
40
## Documentation
55
41
42
+
Cash gives you a query selector, [collection methods](#collection-methods) and some [library methods](#cash-methods). If you need more details about our API just check out [jQuery's](http://api.jquery.com), while we don't implement everything that jQuery provides, everything what we do implement should be compatible with jQuery.
43
+
56
44
### $()
57
45
58
46
This is the main selector method for cash. It returns an actionable collection of nodes.
Cash is bundled using [pacco](https://github.com/fabiospampinato/pacco), therefore it supports partial builds out of the box.
5
+
6
+
In order to make a custom build you'll have to use a custom configuration for pacco, the [default one](https://github.com/kenwheeler/cash/blob/master/pacco.json) includes everything.
7
+
8
+
Some alternative configuration files are available [here](https://github.com/kenwheeler/cash/tree/master/resources/pacco).
9
+
10
+
## Size Comparison
11
+
12
+
Let's compare the size of those partial builds (you could actually exclude individual methods and get even smaller builds):
0 commit comments