{"id":13437255,"url":"https://github.com/fabiospampinato/cash","last_synced_at":"2025-05-12T15:33:06.492Z","repository":{"id":20941121,"uuid":"24229490","full_name":"fabiospampinato/cash","owner":"fabiospampinato","description":"An absurdly small jQuery alternative for modern browsers.","archived":false,"fork":false,"pushed_at":"2024-03-02T23:20:01.000Z","size":2517,"stargazers_count":7004,"open_issues_count":15,"forks_count":276,"subscribers_count":89,"default_branch":"master","last_synced_at":"2025-05-10T22:52:10.007Z","etag":null,"topics":["cash","dom","javascript","jquery","jquery-alternative","modern-browsers","selector","small","tiny","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiospampinato.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2014-09-19T12:47:40.000Z","updated_at":"2025-05-09T15:59:12.000Z","dependencies_parsed_at":"2023-02-16T21:45:25.801Z","dependency_job_id":"133b4e1b-c1b4-4364-86d3-11a16d23ab6c","html_url":"https://github.com/fabiospampinato/cash","commit_stats":{"total_commits":711,"total_committers":40,"mean_commits":17.775,"dds":"0.37412095639943743","last_synced_commit":"61e3b8f26ca11fecb47c9f0a404228375966a931"},"previous_names":["kenwheeler/cash"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/cash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766117,"owners_count":21960847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cash","dom","javascript","jquery","jquery-alternative","modern-browsers","selector","small","tiny","typescript"],"created_at":"2024-07-31T03:00:55.428Z","updated_at":"2025-05-12T15:33:06.469Z","avatar_url":"https://github.com/fabiospampinato.png","language":"JavaScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":["JavaScript","DOM Manipulation","JavaScript library"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./resources/logo/logo.png\" alt=\"Cash Logo\" width=\"400px\"\u003e\n\u003c/p\u003e\n\n# Cash\n\nCash is an absurdly small jQuery alternative for modern browsers (IE11+) 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.\n\n## Comparison\n\n| Size               | Cash        | Zepto 1.2.0 | jQuery Slim 3.4.1 |\n| ------------------ | ----------- | ----------- | ----------------- |\n| Unminified         | **36.5 KB** | 58.7 KB     | 227 KB            |\n| Minified           | **16 KB**   | 26 KB       | 71 KB             |\n| Minified \u0026 Gzipped | **6 KB**    | 9.8 KB      | 24.4 KB           |\n\nA **76.6%** gain in size reduction compared to jQuery Slim. If you need a smaller bundle, we support [partial builds](https://github.com/fabiospampinato/cash/blob/master/docs/partial_builds.md) too.\n\n| Features                 | Cash                               | Zepto 1.2.0                    | jQuery Slim 3.4.1              |\n| ------------------------ | ---------------------------------- | ------------------------------ | ------------------------------ |\n| Supports Older Browsers  | ❌                                  | ️❌                             | ✔                              |\n| Supports Modern Browsers | ✔                                  | ️✔                             | ✔                              |\n| Actively Maintained      | ✔                                  | ❌                              | ✔                              |\n| Namespaced Events        | ✔                                  | ️❌                             | ✔                              |\n| Typed Codebase           | ✔ (TypeScript)                     | ️❌                             | ❌                              |\n| TypeScript Types         | ✔ (generated from code)            | ⚠️ (via DefinitelyTyped)       | ⚠️ (via DefinitelyTyped)       |\n| Partial Builds           | ✔ (can exclude individual methods) | ⚠️ (can exclude whole modules) | ⚠️ (can exclude whole modules) |\n\nIf you're migrating from jQuery be sure to read our [migration guide](https://github.com/fabiospampinato/cash/blob/master/docs/migration_guide.md).\n\n## Usage\n\nYou can get Cash from [jsDelivr](https://cdn.jsdelivr.net/npm/cash-dom/dist/cash.min.js) and use it like this:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/cash-dom/dist/cash.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  $(function () {\n    $('html').addClass ( 'dom-loaded' );\n    $('\u003cfooter\u003eAppended with Cash\u003c/footer\u003e').appendTo ( document.body );\n  });\n\u003c/script\u003e\n```\n\nCash is also available through [npm](https://npmjs.com) as the [`cash-dom`](https://www.npmjs.com/package/cash-dom) package:\n\n```sh\nnpm install --save cash-dom\n```\n\nThat you can then use like this:\n\n```js\nimport $ from \"cash-dom\";\n\n$(function () {\n  $('html').addClass ( 'dom-loaded' );\n  $('\u003cfooter\u003eAppended with Cash\u003c/footer\u003e').appendTo ( document.body );\n});\n```\n\n## Documentation\n\nCash 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](https://api.jquery.com), while we don't implement everything that jQuery provides, pretty much everything that we do implement should be compatible with jQuery. Cash can be extended with custom methods, read how [here](https://github.com/fabiospampinato/cash/blob/master/docs/extending_cash.md).\n\n### $()\n\nThis is the main selector method for Cash. It returns an actionable collection of nodes.\n\nIf a function is provided, the function will be run once the DOM is ready.\n\n```js\n$( selector [, element] ) // =\u003e collection, using `element` as the context\n$( selector [, collection] ) // =\u003e collection, using `collection` as the context\n$(node) // =\u003e collection\n$(nodeList) // =\u003e collection\n$(htmlString) // =\u003e collection\n$(collection) // =\u003e self\n$(function () {}) // =\u003e document ready callback\n```\n\n### Collection Methods\n\nThese methods from the collection prototype ([$.fn](#fn)) are available once you create a collection with `$()` and are called like so:\n\n```js\n$(element).addClass ( className ) // =\u003e collection\n```\n\nSome [extra methods](https://github.com/fabiospampinato/cash/tree/master/src/extra) are available but disabled by default.\n\n| Attributes                           | Collection                 | CSS                  | Data                   | Dimensions                           | Effects                    |\n| ------------------------------------ | -------------------------- | -------------------- | ---------------------- | ------------------------------------ | -------------------------- |\n| [fn.addClass ()](#fnaddclass-)       | [fn.add ()](#fnadd-)       | [fn.css ()](#fncss-) | [fn.data ()](#fndata-) | [fn.height ()](#fnheight-)           | [fn.hide ()](#fnhide-)     |\n| [fn.attr ()](#fnattr-)               | [fn.each ()](#fneach-)     |                      |                        | [fn.innerHeight ()](#fninnerheight-) | [fn.show ()](#fnshow-)     |\n| [fn.hasClass ()](#fnhasclass-)       | [fn.eq ()](#fneq-)         |                      |                        | [fn.innerWidth ()](#fninnerwidth-)   | [fn.toggle ()](#fntoggle-) |\n| [fn.prop ()](#fnprop-)               | [fn.filter ()](#fnfilter-) |                      |                        | [fn.outerHeight ()](#fnouterheight-) |                            |\n| [fn.removeAttr ()](#fnremoveattr-)   | [fn.first ()](#fnfirst-)   |                      |                        | [fn.outerWidth ()](#fnouterwidth-)   |                            |\n| [fn.removeClass ()](#fnremoveclass-) | [fn.get ()](#fnget-)       |                      |                        | [fn.width ()](#fnwidth-)             |                            |\n| [fn.removeProp ()](#fnremoveprop-)   | [fn.index ()](#fnindex-)   |                      |                        |                                      |                            |\n| [fn.toggleClass ()](#fntoggleclass-) | [fn.last ()](#fnlast-)     |                      |                        |                                      |                            |\n|                                      | [fn.map ()](#fnmap-)       |                      |                        |                                      |                            |\n|                                      | [fn.slice ()](#fnslice-)   |                      |                        |                                      |                            |\n\n| Events                       | Forms                            | Manipulation                           | Offset                                 | Traversal                              |\n| ---------------------------- | -------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |\n| [fn.off ()](#fnoff-)         | [fn.serialize ()](#fnserialize-) | [fn.after ()](#fnafter-)               | [fn.offset ()](#fnoffset-)             | [fn.children ()](#fnchildren-)         |\n| [fn.on ()](#fnon-)           | [fn.val ()](#fnval-)             | [fn.append ()](#fnappend-)             | [fn.offsetParent ()](#fnoffsetparent-) | [fn.closest ()](#fnclosest-)           |\n| [fn.one ()](#fnone-)         |                                  | [fn.appendTo ()](#fnappendto-)         | [fn.position ()](#fnposition-)         | [fn.contents ()](#fncontents-)         |\n| [fn.ready ()](#fnready-)     |                                  | [fn.before ()](#fnbefore-)             |                                        | [fn.find ()](#fnfind-)                 |\n| [fn.trigger ()](#fntrigger-) |                                  | [fn.clone ()](#fnclone-)               |                                        | [fn.has ()](#fnhas-)                   |\n|                              |                                  | [fn.detach ()](#fndetach-)             |                                        | [fn.is ()](#fnis-)                     |\n|                              |                                  | [fn.empty ()](#fnempty-)               |                                        | [fn.next ()](#fnnext-)                 |\n|                              |                                  | [fn.html ()](#fnhtml-)                 |                                        | [fn.nextAll ()](#fnnextall-)           |\n|                              |                                  | [fn.insertAfter ()](#fninsertafter-)   |                                        | [fn.nextUntil ()](#fnnextuntil-)       |\n|                              |                                  | [fn.insertBefore ()](#fninsertbefore-) |                                        | [fn.not ()](#fnnot-)                   |\n|                              |                                  | [fn.prepend ()](#fnprepend-)           |                                        | [fn.parent ()](#fnparent-)             |\n|                              |                                  | [fn.prependTo ()](#fnprependto-)       |                                        | [fn.parents ()](#fnparents-)           |\n|                              |                                  | [fn.remove ()](#fnremove-)             |                                        | [fn.parentsUntil ()](#fnparentsuntil-) |\n|                              |                                  | [fn.replaceAll ()](#fnreplaceall-)     |                                        | [fn.prev ()](#fnprev-)                 |\n|                              |                                  | [fn.replaceWith ()](#fnreplacewith-)   |                                        | [fn.prevAll ()](#fnprevall-)           |\n|                              |                                  | [fn.text ()](#fntext-)                 |                                        | [fn.prevUntil ()](#fnprevuntil-)       |\n|                              |                                  | [fn.unwrap ()](#fnunwrap-)             |                                        | [fn.siblings ()](#fnsiblings-)         |\n|                              |                                  | [fn.wrap ()](#fnwrap-)                 |                                        |                                        |\n|                              |                                  | [fn.wrapAll ()](#fnwrapall-)           |                                        |                                        |\n|                              |                                  | [fn.wrapInner ()](#fnwrapinner-)       |                                        |                                        |\n\n#### $.fn\n\nThe main prototype for collections, allowing you to extend Cash with plugins by adding methods to all collections.\n\n```js\n$.fn // =\u003e Cash.prototype\n$.fn.myMethod = function () {}; // Custom method added to all collections\n$.fn.extend ( object ); // Add multiple methods to the prototype\n```\n\n#### fn.add ()\n\nReturns a new collection with the element(s) added to the end.\n\n```js\n$(element).add ( element ) // =\u003e collection\n$(element).add ( selector ) // =\u003e collection\n$(element).add ( collection ) // =\u003e collection\n```\n\n#### fn.addClass ()\n\nAdds the `className` class to each element in the collection.\n\nAccepts space-separated `className` for adding multiple classes.\n\n```js\n$(element).addClass ( className ) // =\u003e collection\n```\n\n#### fn.after ()\n\nInserts content or elements after the collection.\n\n```js\n$(element).after ( element ) // =\u003e collection\n$(element).after ( htmlString ) // =\u003e collection\n$(element).after ( content [, content] ) // =\u003e collection\n```\n\n#### fn.append ()\n\nAppends content or elements to each element in the collection.\n\n```js\n$(element).append ( element ) // =\u003e collection\n$(element).append ( htmlString ) // =\u003e collection\n$(element).append ( content [, content] ) // =\u003e collection\n```\n\n#### fn.appendTo ()\n\nAdds the elements in the collection to the target element(s).\n\n```js\n$(element).appendTo ( element ) // =\u003e collection\n```\n\n#### fn.attr ()\n\nWithout `attrValue`, returns the attribute value of the first element in the collection.\n\nWith `attrValue`, sets the attribute value of each element of the collection.\n\n```js\n$(element).attr ( attrName ) // value\n$(element).attr ( attrName, attrValue ) // =\u003e collection\n$(element).attr ( object ) // =\u003e collection\n```\n\n#### fn.before ()\n\nInserts content or elements before the collection.\n\n```js\n$(element).before ( element ) // =\u003e collection\n$(element).before ( htmlString ) // =\u003e collection\n$(element).before ( content [, content] ) // =\u003e collection\n```\n\n#### fn.children ()\n\nWithout a selector specified, returns a collection of child elements.\n\nWith a selector, returns child elements that match the selector.\n\n```js\n$(element).children () // =\u003e collection\n$(element).children ( selector ) // =\u003e collection\n```\n\n#### fn.closest ()\n\nReturns the closest matching selector up the DOM tree.\n\n```js\n$(element).closest ( selector ) // =\u003e collection\n```\n\n#### fn.contents ()\n\nGet the children of each element in the set of matched elements, including text and comment nodes.\n\nUseful for selecting elements in friendly iframes.\n\n```js\n$('iframe').contents ().find ( '*' ) // =\u003e collection\n```\n\n#### fn.clone ()\n\nReturns a collection with cloned elements.\n\n```js\n$(element).clone () // =\u003e collection\n```\n\n#### fn.detach ()\n\nRemoves collection elements, optionally that match the selector, from the DOM.\n\n```js\n$(element).detach () // =\u003e collection\n$(element).detach ( selector ) // =\u003e collection\n```\n\n#### fn.css ()\n\nReturns a CSS property value when just property is supplied.\n\nSets a CSS property when property and value are supplied.\n\nSets multiple properties when an object is supplied.\n\nProperties will be autoprefixed if needed for the user's browser.\n\n```js\n$(element).css ( property ) // =\u003e value\n$(element).css ( property, value ) // =\u003e collection\n$(element).css ( object ) // =\u003e collection\n```\n\n#### fn.data ()\n\nWithout arguments, returns an object mapping all the `data-*` attributes to their values.\n\nWith a `key`, return the value of the corresponding `data-*` attribute.\n\nWith both a `key` and `value`, sets the value of the corresponding `data-*` attribute to `value`.\n\nMultiple data can be set when an object is supplied.\n\n```js\n$(element).data () // =\u003e object\n$(element).data ( key ) // =\u003e value\n$(element).data ( key, value ) // =\u003e collection\n$(element).data ( object ) // =\u003e collection\n```\n\n#### fn.each ()\n\nIterates over a collection with `callback ( index, element )`. The callback function may exit iteration early by returning `false`.\n\n```js\n$(element).each ( callback ) // =\u003e collection\n```\n\n#### fn.empty ()\n\nEmpties the elements interior markup.\n\n```js\n$(element).empty () // =\u003e collection\n```\n\n#### fn.eq ()\n\nReturns a collection with the element at index.\n\n```js\n$(element).eq ( index ) // =\u003e collection\n```\n\n#### fn.extend ()\n\nAdds properties to the Cash collection prototype.\n\n```js\n$.fn.extend ( object ) // =\u003e object\n```\n\n#### fn.filter ()\n\nReturns the collection that results from applying the filter selector/method.\n\n```js\n$(element).filter ( selector ) // =\u003e collection\n$(element).filter ( function ( index, element ) {} ) // =\u003e collection\n```\n\n#### fn.find ()\n\nReturns selector match descendants from the first element in the collection.\n\n```js\n$(element).find ( selector ) // =\u003e collection\n```\n\n#### fn.first ()\n\nReturns a collection containing only the first element.\n\n```js\n$(element).first () // =\u003e collection\n```\n\n#### fn.get ()\n\nReturns the element at the index, or returns all elements.\n\n```js\n$(element).get ( index ) // =\u003e domNode\n$(element).get () // =\u003e domNode[]\n```\n\n#### fn.has ()\n\nReduce the set of matched elements to those that have a descendant that matches the selector or DOM element.\n\n```js\n$(element).has ( selector ) // =\u003e collection\n$(element).has ( element ) // =\u003e collection\n```\n\n#### fn.hasClass ()\n\nReturns the boolean result of checking if any element in the collection has the `className` attribute.\n\n```js\n$(element).hasClass ( className ) // =\u003e boolean\n```\n\n#### fn.height ()\n\nReturns or sets the height of the element.\n\n```js\n$(element).height () // =\u003e Integer\n$(element).height ( number ) // =\u003e collection\n```\n\n#### fn.hide ()\n\nHide the elements.\n\n```js\n$(element).hide () // =\u003e collection\n```\n\n#### fn.html ()\n\nReturns the HTML text of the first element in the collection, sets the HTML if provided.\n\n```js\n$(element).html () // =\u003e HTML Text\n$(element).html ( htmlString ) // =\u003e HTML Text\n```\n\n#### fn.index ()\n\nReturns the index of the element in its parent if an element or selector isn't provided. Returns index within element or selector if it is.\n\n```js\n$(element).index () // =\u003e Integer\n$(element).index ( element ) // =\u003e Integer\n```\n\n#### fn.innerHeight ()\n\nReturns the height of the element + padding.\n\n```js\n$(element).innerHeight () // =\u003e Integer\n```\n\n#### fn.innerWidth ()\n\nReturns the width of the element + padding.\n\n```js\n$(element).innerWidth () // =\u003e Integer\n```\n\n#### fn.insertAfter ()\n\nInserts collection after specified element.\n\n```js\n$(element).insertAfter ( element ) // =\u003e collection\n```\n\n#### fn.insertBefore ()\n\nInserts collection before specified element.\n\n```js\n$(element).insertBefore ( element ) // =\u003e collection\n```\n\n#### fn.is ()\n\nReturns whether the provided selector, element or collection matches any element in the collection.\n\n```js\n$(element).is ( selector ) // =\u003e boolean\n```\n\n#### fn.last ()\n\nReturns a collection containing only the last element.\n\n```js\n$(element).last () // =\u003e collection\n```\n\n#### fn.map ()\n\nReturns a new collection, mapping each element with `callback ( index, element )`.\n\n```js\n$(selector).map ( callback ) // =\u003e collection\n```\n\n#### fn.next ()\n\nReturns the next adjacent elements.\n\n```js\n$(element).next () // =\u003e collection\n$(element).next ( selector ) // =\u003e collection\n```\n\n#### fn.nextAll ()\n\nReturns all the next elements.\n\n```js\n$(element).nextAll () // =\u003e collection\n$(element).nextAll ( selector ) // =\u003e collection\n```\n\n#### fn.nextUntil ()\n\nReturns all the next elements, until the provided selector matches.\n\n```js\n$(element).nextUntil ( selector ) // =\u003e collection\n$(element).nextUntil ( selector, filterSelector ) // =\u003e collection\n```\n\n#### fn.not ()\n\nFilters collection by false match on collection/selector.\n\n```js\n$(element).not ( selector ) // =\u003e collection\n$(element).not ( collection ) // =\u003e collection\n```\n\n#### fn.off ()\n\nRemoves event listener from collection elements.\n\nAccepts space-separated `eventName` for removing multiple events listeners.\n\nRemoves all event listeners if called without arguments.\n\n```js\n$(element).off ( eventName, eventHandler ) // =\u003e collection\n$(element).off ( eventName ) // =\u003e collection\n$(element).off ( eventsMap ) // =\u003e collection\n$(element).off () // =\u003e collection\n```\n\n#### fn.offset ()\n\nGet the coordinates of the first element in a collection relative to the document.\n\n```js\n$(element).offset () // =\u003e Object\n```\n\n#### fn.offsetParent ()\n\nGet the first element's ancestor that's positioned.\n\n```js\n$(element).offsetParent () // =\u003e collection\n```\n\n#### fn.on ()\n\nAdds event listener to collection elements.\n\nAccepts space-separated `eventName` for listening to multiple events.\n\nEvent is delegated if delegate is supplied.\n\n```js\n$(element).on ( eventsMap ) // =\u003e collection\n$(element).on ( eventName, eventHandler ) // =\u003e collection\n$(element).on ( eventName, delegate, eventHandler ) // =\u003e collection\n```\n\n#### fn.one ()\n\nAdds event listener to collection elements that only triggers once for each element.\n\nAccepts space-separated `eventName` for listening to multiple events.\n\nEvent is delegated if delegate is supplied.\n\n```js\n$(element).one ( eventName, eventHandler ) // =\u003e collection\n$(element).one ( eventName, delegate, eventHandler ) // =\u003e collection\n```\n\n#### fn.outerHeight ()\n\nReturns the outer height of the element. Includes margins if `includeMargings` is set to true.\n\n```js\n$(element).outerHeight () // =\u003e Integer\n$(element).outerHeight ( includeMargins ) // =\u003e Integer\n```\n\n#### fn.outerWidth ()\n\nReturns the outer width of the element. Includes margins if `includeMargings` is set to true.\n\n```js\n$(element).outerWidth () // =\u003e Integer\n$(element).outerWidth ( includeMargins ) // =\u003e Integer\n```\n\n#### fn.parent ()\n\nReturns collection of elements who are parent of elements.\n\n```js\n$(element).parent () // =\u003e collection\n$(element).parent ( selector ) // =\u003e collection\n```\n\n#### fn.parents ()\n\nReturns collection of elements who are parents of elements. Optionally filtering by selector.\n\n```js\n$(element).parents () // =\u003e collection\n$(element).parents ( selector ) // =\u003e collection\n```\n\n#### fn.parentsUntil ()\n\nReturns collection of elements who are parents of elements, until a provided selector matches. Optionally filtering by selector.\n\n```js\n$(element).parentsUntil ( selector ) // =\u003e collection\n$(element).parentsUntil ( selector, filterSelector ) // =\u003e collection\n```\n\n#### fn.position ()\n\nGet the coordinates of the first element in a collection relative to its `offsetParent`.\n\n```js\n$(element).position () // =\u003e object\n```\n\n#### fn.prepend ()\n\nPrepends content or elements to the each element in collection.\n\n```js\n$(element).prepend ( element ) // =\u003e collection\n$(element).prepend ( htmlString ) // =\u003e collection\n$(element).prepend ( content [, content] ) // =\u003e collection\n```\n\n#### fn.prependTo ()\n\nPrepends elements in a collection to the target element(s).\n\n```js\n$(element).prependTo ( element ) // =\u003e collection\n```\n\n#### fn.prev ()\n\nReturns the previous adjacent elements.\n\n```js\n$(element).prev () // =\u003e collection\n$(element).prev ( selector ) // =\u003e collection\n```\n\n#### fn.prevAll ()\n\nReturns all the previous elements.\n\n```js\n$(element).prevAll () // =\u003e collection\n$(element).prevAll ( selector ) // =\u003e collection\n```\n\n#### fn.prevUntil ()\n\nReturns all the previous elements, until the provided selector matches.\n\n```js\n$(element).prevUntil ( selector ) // =\u003e collection\n$(element).prevUntil ( selector, filterSelector ) // =\u003e collection\n```\n\n#### fn.prop ()\n\nReturns a property value when just property is supplied.\n\nSets a property when property and value are supplied, and sets multiple properties when an object is supplied.\n\n```js\n$(element).prop ( property ) // =\u003e property value\n$(element).prop ( property, value ) // =\u003e collection\n$(element).prop ( object ) // =\u003e collection\n```\n\n#### fn.ready ()\n\nCalls callback method on DOMContentLoaded.\n\n```js\n$(document).ready ( callback ) // =\u003e collection/span\n```\n\n#### fn.remove ()\n\nRemoves collection elements, optionally that match the selector, from the DOM and removes all their event listeners.\n\n```js\n$(element).remove () // =\u003e collection\n$(element).remove ( selector ) // =\u003e collection\n```\n\n#### fn.replaceAll ()\n\nThis is similar to [fn.replaceWith ()](#fnreplacewith-), but with the source and target reversed.\n\n```js\n$(element).replaceAll ( content ) // =\u003e collection\n```\n\n#### fn.replaceWith ()\n\nReplace collection elements with the provided new content.\n\n```js\n$(element).replaceWith ( content ) // =\u003e collection\n```\n\n#### fn.removeAttr ()\n\nRemoves attribute from collection elements.\n\nAccepts space-separated attrName for removing multiple attributes.\n\n```js\n$(element).removeAttr ( attrName ) // =\u003e collection\n```\n\n#### fn.removeClass ()\n\nRemoves className from collection elements.\n\nAccepts space-separated className for adding multiple classes.\n\nProviding no arguments will remove all classes.\n\n```js\n$(element).removeClass () // =\u003e collection\n$(element).removeClass ( className ) // =\u003e collection\n```\n\n#### fn.removeProp ()\n\nRemoves property from collection elements.\n\n```js\n$(element).removeProp ( propName ) // =\u003e collection\n```\n\n#### fn.serialize ()\n\nWhen called on a form, serializes and returns form data.\n\n```js\n$(form).serialize () // =\u003e String\n```\n\n#### fn.show ()\n\nShow the elements.\n\n```js\n$(element).show () // =\u003e collection\n```\n\n#### fn.siblings ()\n\nReturns a collection of sibling elements.\n\n```js\n$(element).siblings () // =\u003e collection\n$(element).siblings ( selector ) // =\u003e collection\n```\n\n#### fn.slice ()\n\nReturns a new collection with elements taken from start to end.\n\n```js\n$(selector).slice ( start, end ) // =\u003e collection\n```\n\n#### fn.text ()\n\nReturns the inner text of the first element in the collection, sets the text if textContent is provided.\n\n```js\n$(element).text () // =\u003e text\n$(element).text ( textContent ) // =\u003e collection\n```\n\n#### fn.toggle ()\n\nHide or show the elements.\n\n```js\n$(element).toggle () // =\u003e collection\n$(element).toggle ( force ) // =\u003e collection\n```\n\n#### fn.toggleClass ()\n\nAdds or removes className from collection elements based on if the element already has the class.\n\nAccepts space-separated classNames for toggling multiple classes, and an optional `force` boolean to ensure classes are added (`true`) or removed (`false`).\n\n```js\n$(element).toggleClass ( className ) // =\u003e collection\n$(element).toggleClass ( className, force ) // =\u003e collection\n```\n\n#### fn.trigger ()\n\nTriggers supplied event on elements in collection. Data can be passed along as the second parameter.\n\n```js\n$(element).trigger ( eventName ) // =\u003e collection\n$(element).trigger ( eventObj ) // =\u003e collection\n$(element).trigger ( eventName, data ) // =\u003e collection\n$(element).trigger ( eventObj, data ) // =\u003e collection\n```\n\n#### fn.unwrap ()\n\nRemoves the wrapper from all elements.\n\n```js\n$(element).unwrap () // =\u003e collection\n```\n\n#### fn.val ()\n\nReturns an inputs value. If value is supplied, sets all inputs in collection's value to the value argument.\n\n```js\n$(input).val () // =\u003e value\n$(input).val ( value ) // =\u003e collection\n```\n\n#### fn.width ()\n\nReturns or sets the width of the element.\n\n```js\n$(element).width () // =\u003e number\n$(element).width ( number ) // =\u003e collection\n```\n\n#### fn.wrap ()\n\nWraps a structure around each element.\n\n```js\n$(element).wrap ( structure ) // =\u003e collection\n```\n\n#### fn.wrapAll ()\n\nWraps a structure around all elements.\n\n```js\n$(element).wrapAll ( structure ) // =\u003e collection\n```\n\n#### fn.wrapInner ()\n\nWraps a structure around all children.\n\n```js\n$(element).wrapInner ( structure ) // =\u003e collection\n```\n\n### Cash Methods\n\nThese methods are exported from the global `$` object, and are called like so:\n\n```js\n$.isArray ( arr ) // =\u003e boolean\n```\n\nSome [extra methods](https://github.com/fabiospampinato/cash/tree/master/src/extra) are available but [disabled](https://github.com/fabiospampinato/cash/blob/master/pacco.json#L3) by default.\n\n| Type Checking                         | Utilities                     |\n| ------------------------------------- | ----------------------------- |\n| [$.isArray ()](#isarray-)             | [$.guid](#guid)               |\n| [$.isFunction ()](#isfunction-)       | [$.each ()](#each-)           |\n| [$.isNumeric ()](#isnumeric-)         | [$.extend ()](#extend-)       |\n| [$.isPlainObject ()](#isplainobject-) | [$.parseHTML ()](#parsehtml-) |\n| [$.isWindow ()](#iswindow-)           | [$.unique ()](#unique-)       |\n\n#### $.guid\n\nA unique number.\n\n```js\n$.guid++ // =\u003e number\n```\n\n#### $.each ()\n\nIterates through an array and calls the `callback ( index, element )` method on each element.\n\nIterates through an object and calls the `callback ( key, value )` method on each property.\n\nThe callback function may exit iteration early by returning `false`.\n\n```js\n$.each ( array, callback ) // =\u003e array\n$.each ( object, callback ) // =\u003e object\n```\n\n#### $.extend ()\n\nExtends target object with properties from the source object, potentially deeply too.\n\n```js\n$.extend ( target, source ) // =\u003e object\n$.extend ( true, target, source ) // =\u003e object\n```\n\n#### $.isArray ()\n\nCheck if the argument is an array.\n\n```js\n$.isArray ([ 1, 2, 3 ]) // =\u003e true\n```\n\n#### $.isFunction ()\n\nCheck if the argument is a function.\n\n```js\nfunction fn () {};\n$.isFunction ( fn ) // =\u003e true\n```\n\n#### $.isNumeric ()\n\nCheck if the argument is numeric.\n\n```js\n$.isNumeric ( 57 ) // =\u003e true\n```\n\n#### $.isPlainObject ()\n\nCheck if the argument is a plain object.\n\n```js\n$.isPlainObject ( {} ) // =\u003e true\n```\n\n#### $.isWindow ()\n\nCheck if the argument is a Window object.\n\n```js\n$.isWindow ( window ) // =\u003e true\n```\n\n#### $.parseHTML ()\n\nReturns a collection from an HTML string.\n\n```js\n$.parseHTML ( htmlString ) // =\u003e collection\n```\n\n#### $.unique ()\n\nReturns a new array with duplicates removed.\n\n```js\n$.unique ( array ) // =\u003e array\n```\n\n## Contributing\n\nIf you found a problem, or have a feature request, please open an [issue](https://github.com/fabiospampinato/cash/issues) about it.\n\nIf you want to make a pull request you should:\n\n1. Clone the repository: `git clone https://github.com/fabiospampinato/cash.git`.\n2. Enter the cloned repository: `cd cash`\n3. Install the dependencies: `npm install`.\n4. Automatically recompile Cash whenever a change is made: `npm run dev`.\n5. Open the test suite: `npm run test`.\n6. Remember to update the readme, if necessary.\n\n## Thanks\n\n- **[@kenwheeler](https://github.com/kenwheeler), [@shshaw](https://github.com/shshaw), [@jamiebuilds](https://github.com/jamiebuilds), [@simeydotme](https://github.com/simeydotme)** and all the contributors who helped making Cash.\n- **[@hisk](https://github.com/hisk)** - The \"design focused engineer\" behind our awesome logo.\n\n## License\n\nMIT © Fabio Spampinato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fcash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Fcash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fcash/lists"}