[
  {
    "path": ".editorconfig",
    "content": "\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\n---\n\n<!-- Please search existing issues to avoid creating duplicates -->\n\n### Current behavior\n\n<!-- Describe how to reproduce the issue -->\n\n### Expected behavior\n\n<!-- Describe what is the expected behavior -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\n---\n\n<!-- Please search existing issues to avoid creating duplicates -->\n\n### Feature description\n\n<!-- Describe the feature you'd like -->\n\n### Feature motivation\n\n<!-- Why do you want this? -->\n\nIs this feature present in jQuery? Yes/No\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question.md",
    "content": "---\nname: Question\nabout: Ask a question\n---\n\n<!-- Please search existing issues to avoid creating duplicates -->\n"
  },
  {
    "path": ".gitignore",
    "content": "*~\n*.err\n*.log\n._*\n.cache\n.fseventsd\n.DocumentRevisions*\n.DS_Store\n.TemporaryItems\n.Trashes\nThumbs.db\n\ndist\nnode_modules\npackage-lock.json\n"
  },
  {
    "path": "bump.json",
    "content": "{\n  \"changelog\": {\n    \"path\": \"changelog.md\",\n    \"version\": \"### [v[version]](https://github.com/fabiospampinato/cash/releases/tag/[version]) ([version_date])\"\n  },\n  \"tag\": {\n    \"enabled\": false,\n    \"name\": \"[version]\"\n  },\n  \"release\": {\n    \"github\": {\n      \"enabled\": true,\n      \"files\": [\n        \"**/dist/**\"\n      ]\n    }\n  },\n  \"scripts\": {\n    \"prebump\": \"npm run prepublishOnly\",\n    \"prerelease\": \"npm run prepublishOnly\",\n    \"postrelease\": \"npm publish\"\n  }\n}\n"
  },
  {
    "path": "changelog.md",
    "content": "### [v8.1.5](https://github.com/fabiospampinato/cash/releases/tag/8.1.5) (2023-04-13)\n\n- Fixed support for using a selector as context\n- $.hide: ensuring calling it multiple times sequentially works too\n\n### [v8.1.4](https://github.com/fabiospampinato/cash/releases/tag/8.1.4) (2023-03-08)\n\n- Updatd contribution guide\n- Replaced Karma with Playwright, removing most dev dependencies, removing coverage reports, and adding support for Safari\n- Updated dependencies\n- Lowercased readme file\n- Lowercased changelog file\n- $.serialize: avoiding encoding \"%20\" as \"+\", for better alignment with jQuery\n\n### [v8.1.3](https://github.com/fabiospampinato/cash/releases/tag/8.1.3) (2023-01-31)\n\n- $.fn.text: ensuring it reads text from every node in the collection, not just the first one, for better alignment with jQuery\n\n### [v8.1.2](https://github.com/fabiospampinato/cash/releases/tag/8.1.2) (2022-11-18)\n\n- Migration guide: mentioning $.fn.css as a potential workaround for ignoring the effects of CSS transforms\n- $.fn.html: ensuring script elements are executed, to better align with jQuery\n- Switched to a new bundler, minipacco\n- Deleted most development dependencies\n- Simplified significantly partial compilation\n- Ensuring selectors contains escaped dots are handled correctly\n\n### [v8.1.1](https://github.com/fabiospampinato/cash/releases/tag/8.1.1) (2022-02-16)\n\n- Ensuring the proper types for iteration are provided\n- Ensuring $.fn.find works with document fragments too\n- Ensuring the \"delegateProperty\" is attached to events\n- More reliably using \"getElementById\", only if the context node actually supports it\n- Ensuring that before inserting a node before/after the html node the html node is removed from the DOM\n\n### [v8.1.0](https://github.com/fabiospampinato/cash/releases/tag/8.1.0) (2020-09-12)\n\n- Added `$.isPlainObject`\n- $.each: added support for iterating over objects\n- $.extend: added support for extending deeply\n- Readme: updated dimensions\n- Updated changelog template\n\n### [v8.0.0](https://github.com/fabiospampinato/cash/releases/tag/8.0.0) (2020-06-20)\n\n- Improved alignment with jQuery regarding handling of non-bubbling events significantly\n\n### [v7.0.4](https://github.com/fabiospampinato/cash/releases/tag/7.0.4) (2020-06-19)\n\n- Ensuring unusual but valid simple selectors are handled properly\n\n### [v7.0.3](https://github.com/fabiospampinato/cash/releases/tag/7.0.3) (2020-05-31)\n\n- Updated \"EleLoose\" type\n\n### v7.0.2 (2020-05-30)\n\n- Readme: updated npm installation command\n- Updated the \"EleLoose\" TypeScript type ensuring it isn't evaluated as \"never\"\n\n### [v7.0.1](https://github.com/fabiospampinato/cash/releases/tag/7.0.1) (2020-04-15)\n\n- $.fn.css: added support for retrieving properties of disconnected nodes\n\n### [v7.0.0](https://github.com/fabiospampinato/cash/releases/tag/7.0.0) (2020-03-31)\n\n- focus|blur|mouseenter|mouseleave: ensuring namespaces are handled properly\n- focus|blur|mouseenter|mouseleave: aligned behavior more with jQuery\n- focus|blur|mouseenter|mouseleave: ensuring natively triggered events are handled properly\n- Migration guide: mentioning native non-bubbling events\n\n### [v6.0.2](https://github.com/fabiospampinato/cash/releases/tag/6.0.2) (2020-02-15)\n\n- Readme: improved comparison with jQuery, fixing some wrong/unfair comparisons/statements\n- Migration guide: mentioning sort order\n- $.fn.ready: ensuring the callback is called asynchronously and errors are not silenced\n\n### [v6.0.1](https://github.com/fabiospampinato/cash/releases/tag/6.0.1) (2020-01-05)\n\n- Ensuring events work with Document and Window objects\n- Ensuring \"event.data\" is setted reliably\n\n### [v6.0.0](https://github.com/fabiospampinato/cash/releases/tag/6.0.0) (2020-01-05)\n\n##### Removed Features\n\n- $.camelCase|matches|isString|prefixedProp: no longer exposing these methods, aligning with jQuery\n\n##### New Features\n\n- $.fn.nextUntil|prevUntil|parentsUntil: implemented these methods\n- $.fn.detach|remove: added support for an optional \"selector\" argument\n- $.fn.on|one: added support for an optional \"data\" argument\n- Set-up test coverage (currently at ~99%) reporting to coveralls.io\n- Migration guide: major update\n\n##### Bug Fixes\n\n- $.extend: aligned more with jQuery when called with zero or one argument\n- $.fn.before|after|append|prepend|insertBefore|insertAfter|appendTo|prependTo: ensuring cloned scripts don't get executed\n- $.fn.contents: ensuring template elements are supported\n- $.fn.css: ensuring \"grid-*\" properties don't get the \"px\" suffix appended to their values when they are not supposed to\n- $.fn.data: doing nothing when trying to set values to undefined\n- $.fn.data: ensuring strings containing leading/trailing whitespace aren't parsed as JSON\n- $.fn.get|eq: ensuring string indexes are supported\n- $.fn.map: ensuring callbacks that return an array of elements are supported too\n- $.fn.offset|offsetParent|position: rewritten to much more closely match jQuery's implementation\n- $.fn.on|one|off: ensuring namespaces-only events are ignored\n- $.fn.on|one|off: ensuring they don't throw when receiving a falsy callback\n- $.fn.on|one: ensuring these methods are chainable even when receiving falsy callbacks\n- $.fn.prop|removeProp: mapping special HTML attributes into their equivalent DOM properties (e.g. \"for\" -> \"htmlFor\")\n- $.fn.ready: ensuring exceptions are always caught, so they can't crash the app\n- $.fn.serialize: normalizing newlines\n- $.fn.trigger: testing that non-nil falsy values are passed correctly\n- $.fn.unwrap: ensuring immediate children of the body don't get unwrapped\n- $.fn.val: ensuring checkboxes and radios can be set properly\n- $.fn.val: ensuring non-string values are supported\n- $.fn.val|html: more reliably detecting when being called with no arguments\n- $.fn.width|height|innerWidth|innerHeight|outerWidth|outerHeight: ensuring document objects are supported too\n- $.fn.width|height|innerWidth|innerHeight|outerWidth|outerHeight: ensuring they return the right value for the Window object\n- $.fn.wrapAll: ensuring elements aren't cloned unnecessarely\n- $.parseHTML: ensuring whitespace around a single HTML tag is preserved\n- Ensuring empty selectors don't throw an error\n- Collections containing non-element objects:\n  - $.fn.addClass|removeClass|toggleClass: ensuring it doesn't throw with collections containing non-elements\n  - $.fn.attr: ensuring a collection containing non-element objects doesn't cause an error to be thrown\n  - $.fn.before|after|append|prepend|insertBefore|insertAfter|appendTo|prependTo: ensuring non-element nodes are accounted for properly\n  - $.fn.hasClass: ensuring a collection containing non-element objects doesn't cause an error to be thrown\n  - $.fn.hide|show|toggle: ensuring a collection containing non-element objects doesn't cause an error to be thrown\n  - $.fn.html: ensuring collections containing non-element objects are supported\n  - $.fn.not: ensuring non-element nodes are excluded\n  - $.fn.on|off: ensuring non-element objects in the collection are ignored\n  - $.fn.removeAttr: ensuring a collection containing non-element objects doesn't cause an error to be thrown\n  - $.fn.text: improved support of collections containing non-elements objects\n\n### [v5.0.0](https://github.com/fabiospampinato/cash/releases/tag/5.0.0) (2019-12-17)\n\n- Dropped support for IE10\n- $.fn.hasClass: ensuring it always returns a boolean\n- $.fn.off: accepting also an events map as its only argument\n- $.fn.show|toggle: restoring custom display values\n- $.fn.before|after|append|prepend|insertBefore|insertAfter|appendTo|prependTo: ensuring multiple nodes are inserted in the correct order\n- Ensuring attached events never get forgotten\n- Ensuring script tags are executed even if they have a \"src\" attribute, and without using `eval`\n- Ensuring the order of event namespaces doesn't matter\n- Squeezed some more bytes out of the bundle (~4%) and improved code style consistency\n- Squeezed some more bytes out of the bundle (~1.5%), bringing back the minified and gzipped size below 5kb\n\n### [v4.1.5](https://github.com/fabiospampinato/cash/releases/tag/4.1.5) (2019-09-06)\n\n- $.fn.val: ensuring it works with \"input[type=file][multiple]\" elements\n- Migration guide: mentioning how $.fn.data stores values\n\n### [v4.1.4](https://github.com/fabiospampinato/cash/releases/tag/4.1.4) (2019-08-05)\n\n- $.fn.get: improved types\n- TypeScript: made types a little more forgiving\n- TypeScript: improved collections index signature\n- TypeScript: improved support for props/methods available only in specific HTML nodes\n- Added a guide for extending Cash\n\n### [v4.1.3](https://github.com/fabiospampinato/cash/releases/tag/4.1.3) (2019-07-13)\n\n- Ensuring Cash can be bundled correctly via webpack\n- $.fn.toggle: ensuring each element is toggled independently\n- TypeScript: ensuring some useful internal types are exported\n- TypeScript: made types a little more forgiving\n\n### [v4.1.2](https://github.com/fabiospampinato/cash/releases/tag/4.1.2) (2019-05-16)\n\n- Avoiding publishing unnecessary files to NPM\n\n### [v4.1.1](https://github.com/fabiospampinato/cash/releases/tag/4.1.1) (2019-05-13)\n\n- Raising bundle size limit to 5.5kB\n- Test: replaced iOS 9.3 with iOS 11.0\n- Test: using setAttribute instead of the dataset API\n- Migration guide: mentioning the `:scope` CSS pseudo-class\n- Migration guide: mentioning inserting plain text\n- TypeScript: typing events more loosely\n- TypeScript: typing collection elements more loosely\n\n### [v4.1.0](https://github.com/fabiospampinato/cash/releases/tag/4.1.0) (2019-05-12)\n\n- Added $.isWindow\n- Made the TypeScript type system stricter\n- $.guid: ensuring it's properly exported\n- $.fn.siblings: ensuring it supports multi-element collections\n- $.fn.empty: ensuring it supports multi-element collections\n- $.fn.attr: doing nothing when the value equals undefined\n\n### [v4.0.0](https://github.com/fabiospampinato/cash/releases/tag/4.0.0) (2019-05-08)\n\n- Removed `$.fn.removeData`\n- Removed `$.hasData`\n- `$.fn.data`: removed caching mechanism\n- `$.fn.data`: added a missing TypeScript method overload\n\n### [v3.2.0](https://github.com/fabiospampinato/cash/releases/tag/3.2.0) (2019-04-30)\n\n- Readme: updated sizes\n- $.fn.off: added support for removing delegated handlers\n\n### [v3.1.0](https://github.com/fabiospampinato/cash/releases/tag/3.1.0) (2019-03-22)\n\n- Improved support for running selectors inside documents\n- Ensuring Cash collections are iterable\n- Added an extra reference implementation for shorthand event methods\n- Added an extra reference implementation for `$.getScript`\n- Readme: mentioning the extra methods\n\n### [v3.0.0](https://github.com/fabiospampinato/cash/releases/tag/3.0.0) (2019-03-17)\n\n- Library rewritten in TypeScript\n- Bundle TypeScript typings (no need for @types/cash, which is now obsolete)\n- Added a changelog\n- Migration guide: mention the `zoom` property\n- Readme: improved description of the optional context argument\n- Ensure valid TypeScript types are generated\n- Ensure build files are updated when bumping the version\n\n### v3.0.0-beta.3 (2018-12-06)\n\n- Fixed export on the ESM build\n\n### v3.0.0-beta.2 (2018-11-21)\n\n- Renamed some \"private\" variables\n- Travis: avoiding caching `node_modules`\n- Test: improved tests regarding event delegating\n- Migration guide: added a section about events\n- Moved \"@types/*\" to \"dependencies\"\n- Replaced tabs with spaces\n- $.fn.trigger: triggering focus/blur natively\n- Event delegation: ensuring events that do not bubble (focus/blur/mouseenter/mouseleave) are still usable\n- Test: renamed some tests\n- Event delegation: ensuring `event.currentTarget` points to the right element\n- Migration guide: added a section about computing the dimensions of hidden elements\n- Fixed support for `event.currentTarget`\n- Migration guide: added a section about parsing script tags\n- Generalized `insertElement` to support a custom prepend target\n- Evaluating the content of `script` tags when attaching them to the DOM\n- Migration guide: added a `loadScript` function\n- find: improved resilience against text/comment/etc. nodes\n- $.fn.trigger: using `MouseEvents` when appropriate\n- evalScripts: improved browsers support\n- Improved support for `event.currentTarget`\n\n### v3.0.0-beta.1 (2018-10-27)\n\n- Merge branch 'master' of github.com:kenwheeler/cash\n- Updated Karma configuration\n- $.fn.hasClass: ensuring it supports falsy values\n- $.matches: added back support for vendor-prefixed methods\n- Updated test suite\n- $.fn.val: improved support for old-ish browsers\n- Karma: picking versions relative to `latest`, when possible\n- Readme: ensuring `Cash` is always title-cased\n- Added a `filtered` utility\n- $.fn.children: cleaner implementation\n- $.fn.closest: faster implementation\n- $.fn.next|parent|prev|siblings: added support for an optional selector\n- pluck: added an optional `deep` parameter\n- $.fn.parents: much cleaner implementation\n- Added `$.fn.prevAll`\n- Added `$.fn.nextAll`\n- Updated readme\n- Added a \"Migration Guide\"\n- Added `$.fn.hide|show|toggle`\n- Added `$.fn.unwrap|wrap|wrapAll|wrapInner`\n\n### v3.0.0-beta.0 (2018-10-26)\n\n- Test: added Firefox to Karma\n- Rewritten test suite\n- TypeScript: updated compiler options\n- $.fn.hasClass: aligned more with jQuery\n- $.camelCase: aligned more with jQuery\n- $.fn.extend: fixed support for defining plugins with it\n- computeStyle: check if a property is actually passed\n- computeStyle: returning `undefined` for unset CSS variables\n- Added `@types/node` as a dev dependency\n- camelCase: removed description\n- $.fn.each: improved performance\n- $.matches: removed support for older browsers\n- Travis: addded bundlesize\n- $.fn.prev|next: retrieving all previous/next elements\n- Test: ensuring `$.fn.replaceWith` and `$.fn.replaceAll` support multiple elements\n- Test: ensuring that `$.fn.data` supports more data types\n- $.fn.replaceWith: much cleaner implementation\n- $.fn.hasClass: much cleaner implementation\n- Added a `pluck` utility\n- $.fn.prev|next|parent: much cleaner implementation\n- $.fn.val: cleaner implementation\n- Simplified some events-related helpers\n- Creating one fewer div element\n- unique: improved performance\n- Updated logo\n- Readme: updated comparison tables\n- Added configuration for `bump`\n\n### [v2.3.9](https://github.com/fabiospampinato/cash/releases/tag/2.3.9) (2018-10-21)\n\n- Changed files extensions to `ts`\n- $.parseHTML: fixed a regression regarding non-browser environments\n\n### [v2.3.8](https://github.com/fabiospampinato/cash/releases/tag/2.3.8) (2018-10-20)\n\n- Updated some dependencies\n- Test: added `travis_retry` to tests with SauceLabs\n- Ignored package-lock.json\n- $.fn.val: ensuring when `null` is passed the value is cleared\n- Test: updated Travis CI configuration\n- Updated some dependencies\n- Test: updated `height` test to better support browsers returning floating values\n- Test: updated Karma configuration\n- $.fn.val: properly handling `null`\n- $.fn.append|prepend: ensuring it doesn't throw when passed `undefined`\n- $.parseHTML: added support for malformed single-tags\n- $.parseHTML: added support for parsing thead/tbody/tfoot/tr/td/th elements\n- Test: removed the \" Passed!\" suffix from messages\n- Test: fixed some malformed HTML\n\n### [v2.3.7](https://github.com/fabiospampinato/cash/releases/tag/2.3.7) (2018-10-14)\n\n- Added cross-platform tests with SauceLabs\n- Test only against node LTS\n- Test: use IE11 on Windows 8.1\n- Added a `test:karma:sauce` script\n- Added a `prepublish` script\n- Added some issue templates\n- Readme: added a \"Contributing\" section\n- Renamed `prepublish` script to `prepublishOnly`\n- Ensuring `$.parseHTML` always preserves the content of nodes\n\n### [v2.3.6](https://github.com/fabiospampinato/cash/releases/tag/2.3.6) (2018-10-03)\n\n- Merge pull request #201 from limonte/patch-1\n- chore(tests): bump qunit to latest\n- Merge pull request #202 from limonte/upgrade-qunit\n- CI: set up Karma test runner + Travis\n- Readme: removed travis-ci badge\n- Coding-style normalization\n- Added a `test:karma` script\n- Test: avoiding passing malformed html to `$.parseHTML`\n- Test: ensuring there are no syntax errors on IE11\n- Readme: added a \"License\" section\n- Readme: added a \"Thanks\" section\n- Optimize .empty(), use removeChild() instead of .innerHTML = ''\n- `$.fn.empty`: updated code style\n\n### [v2.3.5](https://github.com/fabiospampinato/cash/releases/tag/2.3.5) (2018-09-08)\n\n- Improved support for Node.js\n\n### v2.3.4 (2018-09-07)\n\n- Moved `pacco` to `devDependencies`\n\n### [v2.3.3](https://github.com/fabiospampinato/cash/releases/tag/2.3.3) (2018-07-09)\n\n- using the provided context when selecting by id\n- added support for using a cash object as the context\n- Improved readme\n\n### [v2.3.2](https://github.com/fabiospampinato/cash/releases/tag/2.3.2) (2018-07-09)\n\n- Added a logo\n- Ensuring `$.fn.replaceWith` and `$.fn.replaceAll` work with multiple targets\n- $.fn.val: ensuring setting multiple values on a `select[multiple]` works\n- Added some tests\n\n### [v2.3.1](https://github.com/fabiospampinato/cash/releases/tag/2.3.1) (2018-07-05)\n\n- Added support for `window` to dimensions-related methods\n\n### [v2.3.0](https://github.com/fabiospampinato/cash/releases/tag/2.3.0) (2018-07-05)\n\n- Added a `$.fn.contents` method\n\n### [v2.2.1](https://github.com/fabiospampinato/cash/releases/tag/2.2.1) (2018-06-16)\n\n- Ensuring a cash collection gets printed as array-like in Chrome\n\n### [v2.2.0](https://github.com/fabiospampinato/cash/releases/tag/2.2.0) (2018-06-10)\n\n- Improved `test:jquery` script\n- Added `$.hasData`\n- $.fn.serialize: ensuring elements have a name\n- $.fn.serialize: ensuring empty string values are included\n- getValueSelectMultiple: checking for disabled options and disabled parent optgroups\n- $.fn.width|height: ensuring only element nodes are considered\n- computeStyle: ensuring only element nodes are considered\n- $.fn.css: skipping setting unsupported properties\n- $.fn.css: ensuring only element nodes are considered\n- $.parseHTML: ensuring it doesn't throw when non-string values are passed to it\n- $.parseHTML: returning an array instead of a `NodeList`\n- $.fn.attr: returning `undefined` instead of `null` for missing attributes\n- $.fn.attr: removing the attribute when setting a value of `null`\n- $.fn.removeAttr: added support for passing a space-separated string of attributes\n- $.fn.css: added support for CSS variables\n- $.fn.detach: avoding throwing an error when the parent node is missing\n- getData: some minor changes\n- $.fn.data: added support for getting the entire data object\n- Test: added some tests for `$.fn.before` and `$.fn.after`\n- $.fn.before|prepend|append|after: added support for inserting multiple contents\n- $.fn.after|prependTo: fixed ordering\n- $.fn.serialize: skipping inputs of type `image`\n- $.fn.serialize: ensuring multiple forms can be serialized at once\n- $.fn.ready: passing `cash` as the first argument to the callback\n- getSuffixedValue: added back support for `animationIterationCount`\n- $.fn.after|prependTo: avoiding mutating passed objects\n\n### [v2.1.8](https://github.com/fabiospampinato/cash/releases/tag/2.1.8) (2018-06-10)\n\n- Updated some dependencies\n- $.fn.on: calling `preventDefault` and `stopPropagation` on the event if the handler returns `false`\n- Added a `test:jquery` script for running the jQuery test suite with cash\n\n### [v2.1.7](https://github.com/fabiospampinato/cash/releases/tag/2.1.7) (2018-05-28)\n\n- Added some more explicit `@require` statements\n- Added a script for rendering the dependencies graph\n- Added an ESM build\n\n### [v2.1.6](https://github.com/fabiospampinato/cash/releases/tag/2.1.6) (2018-05-19)\n\n- Events: passing the actual target element as `this` for delegated events\n\n### [v2.1.5](https://github.com/fabiospampinato/cash/releases/tag/2.1.5) (2018-05-16)\n\n- $.fn.removeClass: fixed attribute resetting\n\n### v2.1.4 (2018-05-14)\n\n- Updated jsDelivr URL\n- $.fn.trigger: events are now cancelable\n\n### [v2.1.3](https://github.com/fabiospampinato/cash/releases/tag/2.1.3) (2018-05-12)\n\n- Merge pull request #184 from fabiospampinato/master\n- $.fn.width|height: fixed a bug with Firefox\n- Dropped IE9 support\n- Assuming getAttribute/setAttribute/remoteAttribute APIs are available\n- Added a `test:watch` script\n- Explicitly compile for IE10+\n- Switching from UglifyJS to Google Closure Compiler\n- Events: removed jQuery-like methods: isDefaultPrevented/isPropagationStopped/isImmediatePropagationStopped\n- Events: avoiding using `get_data` for the cache\n- $.fn.filter: without a selector returns an empty collection\n- $.fn.index: optimized\n- getPrefixedProp: fixed caching logic\n- Major cleanup and bytes squeezing\n- Readme: updated `fn.has` documentation\n- Readme: fixed a typo\n- Readme: improved wording\n- Updated cash sizes\n- Updated partial builds\n\n### v2.1.2 (2018-05-11)\n\n- Added some alternative configurations for pacco\n- Aligned `$.fn.prop` with jQuery's\n- Aligned `$.fn.removeClass` with jQuery's\n- Event delegation: handling the removal of the target from the DOM\n\n### v2.1.1 (2018-05-03)\n\n- $.parseHTML: added a todo\n- $.fn.filter: optimized\n- $.fn.map: optimized\n- $.fn.find: optimized\n- Minor style changes\n- Aligned `$.fn.removeData` with jQuery's\n\n### v2.1.0 (2018-04-12)\n\n- Aligned `$.fn.each` with jQuery's\n- Aligned `$.fn.map` with jQuery's\n- Aligned `$.fn.filter` with jQuery's\n- $.fn.height|width: setting to each element in the collection\n- $.fn.on: renamed `delegate` to `selector`\n- Aligned `$.val` with jQuery's\n- Aligned `$.fn.data` with jQuery's\n- $.fn.css: automatically adding the `px` suffix when necessary\n- Readme: updated minified + gzip size\n- $.fn.height: fixed\n- Aligned `$.fn.width|height` with jQuery's\n- Added support for namespaced events\n- $.fn.trigger: ensuring all namespaces match\n- Adding some methods to events: isDefaultPrevented, isPropagationStopped, isImmediatePropagationStopped\n\n### v2.0.0 (2018-04-08)\n\n- Added a `guid`\n- $.fn.trigger: added support for triggering already-made events\n- $.fn.on|one|off: added support for multiple events\n- Readme: documented `$.guid`\n- Readme: updated `$.fn.trigger` documentation\n- Readme: updated `$.fn.on|one|off` documentation\n- Events: removing jQuery-like namespaces automatically\n- Added a `$.fn.slice` method\n- $.fn.height|width: added support for setting\n- Renamed `Init` to `Cash`\n- Readme: updated `$.fn.addClass|removeClass`\n- Readme: updated `$.fn.filter`\n- Readme: updated `$.fn.not`\n- Improved support for empty objects, without throwing errors\n- Ensuring eventCache is properly cleared\n- $.fn.off: added support for removing all handlers\n- $.fn.remove: removing also all events\n- Added a `$.fn.detach` method\n- Added a `$.contains` utility\n- Added a `$.fn.replaceWith` method\n- Added a `$.fn.replaceAll` method\n- Removed event un-namespacing\n- Added support for removing wrapped event handlers\n- Added support for removing handlers attached with `.one`\n- $.fn.one: ensuring `callback.guid` is set\n- Passing data as an argument\n- Readme: updated links\n- Renamed `Global Methods` to `Cash Methods`\n- hasClass: properly escaping regex special characters\n- $.fn.offsetParent: ensuring it doesn't throw with an empty collection\n- $.fn.removeData: fixed\n- removeData: fixed a variable name\n- initFragment: passing a string to `doc.implementation.createHTMLDocument`, as per spec\n- Added some tests\n- Requiring pacco@^1.1.0\n- Explicitly compiling for IE >= 9\n- Updated a todo\n\n### [v1.3.7](https://github.com/fabiospampinato/cash/releases/tag/1.3.7) (2018-01-17)\n\n### [v1.3.6](https://github.com/fabiospampinato/cash/releases/tag/1.3.6) (2018-01-11)\n\n- Test fixes\n- Argument required for `createHTMLDocument`\n- fix: attributes/addClass, the wrong checking on class-name inclusion\n- fix: remove `spacedName` from `addClass` interface\n- Added Travis CI support for modern node versions\n- Merge pull request #160 from amilajack/patch-1\n- Update jsDelivr links\n- Merge pull request #168 from LukasDrgon/patch-1\n- Merge pull request #173 from DanielRuf/patch-travis\n- Merge pull request #171 from DanielRuf/patch-readme\n- Merge pull request #157 from AugustMiller/am-createdocument-argument\n- Merge branch 'pr/153' (Async DOM Ready)\n- Merge branch 'pr/158'\n- Compiled className fix\n- Merge pull request #141 from vivekimsit/add-gitattribute\n\n### [v1.3.5](https://github.com/fabiospampinato/cash/releases/tag/1.3.5) (2016-10-12)\n\n- Normalize all text files in the repo\n- Serialize elements outside form as well\n- Fix for #143\n- fn in should always be called asynchronously\n- Merge PR #105 'parseHTML-fix' of https://github.com/softwarespot/cash into 1.3.5\n- Merge PR #116 \"Form Cleanup\"\n- Merge PR #140 \"Form Cleanup\"\n- Merge PR #123 \"Filter Fix\"\n- Merge PR #124 `isFunction` fix\n- Merge PR #133 \"Traversal Fixes\"\n- Merge PR #136 'semicolon-iife' of https://github.com/vivekimsit/cash into 1.3.5\n- Merge PR #138 'constructor-fix' into 1.3.5\n- Merge PR #145 \"event-off-fix\"\n\n### [v1.3.4](https://github.com/fabiospampinato/cash/releases/tag/1.3.4) (2016-06-28)\n\n### [v1.3.3](https://github.com/fabiospampinato/cash/releases/tag/1.3.3) (2016-05-20)\n\n- Filter fix\n\n### [v1.3.2](https://github.com/fabiospampinato/cash/releases/tag/1.3.2) (2016-05-18)\n\n### [v1.3.1](https://github.com/fabiospampinato/cash/releases/tag/1.3.1) (2016-05-16)\n\n- CDN version links\n\n### [v1.3.0](https://github.com/fabiospampinato/cash/releases/tag/1.3.0) (2016-05-04)\n\n- jQuery 3 comparison\n- Unified compare function for `$.fn.is` and `$.fn.not` to support looking for elements\n- Fixed `$.fn.siblings` to return a Collection instead of Array.\n- Fix for `$.fn.has` to return collection instead of Array and support for checking for an element instead of a string selector.\n- Use `$.fn.find` with an element instead of selector.\n- Merge branch 'master' of https://github.com/kenwheeler/cash\n- Fix for `$.fn.closest` to return correct results, `$.fn.filter` can now filter by Elements\n- Fix for #135: `$.fn.closest()` callstack exceeded\n- Use `Object.defineProperty` to attach the `constructor` property to the `cash.fn` prototype. #134\n- merge PR #110\n- merge PR #111\n\n### v1.2.3 (2016-??-??)\n\n- Saving bytes\n- [ remove class ] - add test for removing all classes\n- [ remove all classes ] - add an option for removing all classes - supply no arguments to .removeClass() - update readme\n\n### v1.2.2 (2016-??-??)\n\n- `$.fn.filter` fix\n- merge PR #96\n- [ add / remove / toggle / has class ] - add checks for integers and falsey values - closer to jQuery - was having script-killing errors when `.addClass(\"\")`\n\n### [v1.2.1](https://github.com/fabiospampinato/cash/releases/tag/1.2.1) (2016-04-25)\n\n- [ attr() ] - fix to return collection for multi-add\n- [ update ] - improve based on @shshaw comment https://github.com/kenwheeler/cash/pull/111#issuecomment-216283171\n- Cleanup and @rwwagner90 fix\n- CloudFlare CDN\n- Clarified intro paragraph\n- Updated parseHTML which fixes the base URL issue\n- Fix conflict\n- Merge branch 'kenwheeler-master'\n- Added NPM reference\n- Bower.json fix\n- Usage updates\n- Merge pull request #102 from kenwheeler/npm-bower-fixes\n- Update README.md\n- Fix example for $.isArray\n- Merge pull request #81 from shvelo/patch-1\n- Add data to trigger event\n- Increment test values\n- Update README to state approximate size\n- Merge pull request #84 from joezimjs/master\n- Browser Support Clarification\n- Size comparison\n- Latest CDN version\n- Heading comment\n- Set multiple attributes &amp; properties\n- Merge pull request #87 from kenwheeler/attr-obj\n- added index to docs\n- updated utilities &amp; type checking links\n- Merge pull request #89 from devinargenta/docs/index-added\n- Size alignment\n- Documentation for `$.fn.offet`, `$.fn.offetParent` and `$.fn.position`\n- Documentation for `$.fn.removeProp`\n- Documentation for setting properties\n- Utility alphabetical order\n- Clarifying $.fn prototype\n- Method index tables ( #88 )\n\n### [v1.2.0](https://github.com/fabiospampinato/cash/releases/tag/1.2.0) (2016-04-01)\n\n- Merge pull request #1 from shshaw/selector\n- Merge pull request #70 from shshaw/master\n- Size updates\n- Keep CDN files at last version until the CDNs have had a chance to update.\n- Simplified `on`\n- Updated README\n- Merge pull request #115 from kenwheeler/1.3.0\n\n### [v1.1.0](https://github.com/fabiospampinato/cash/releases/tag/1.1.0) (2016-04-12)\n\n- Fixed css() return value for object type input\n- Merge pull request #58 from kornalius/master\n- Update README.md\n- Fixing length to 0 when element doesn't exist\n- Merge pull request #64 from defrag/fix/empty-item-length\n- Merge pull request #65 from defrag/fix/suite-fix\n- Improve `fn.find`\n- `return false` breaks `.each`\n- `fn.children` and `fn.is` improvements\n- Smaller file size &amp; consistency\n- Improve `append`, `prepend`\n- Clone entire collections\n- Added `.map`\n- README fixes\n- Simplification of manipulations\n- Fixed chainability of `remove`\n- Traversal cleanup\n- Unified collection functions\n- Simplified class manipulation\n- Form fixes\n- Tiny utils added to `cash`\n- Trim down by using local `each`\n- `add`, `push` and `splice`\n- `toggleClass`\n- Trimming\n- Multi-parameter extend\n- Merge pull request #66 from shshaw/master\n- Merge remote-tracking branch 'kenwheeler/master'\n- Trimmed `index`\n- Direct `map`\n- Trimmed `outerWidth` &amp; `outerHeight`\n- Cleaned up events\n- Form serialize fix\n- Merge pull request #67 from shshaw/master\n- Merge remote-tracking branch 'kenwheeler/master'\n- `after`, `before` &amp; `insert...`\n- Updated hints\n- Simplified `outerWidth` &amp; `outerHeight`\n- Prefixed CSS Properties\n- Selector performance\n- Form test update\n- Merge pull request #69 from shshaw/better-selector\n- Merge remote-tracking branch 'kenwheeler/master' into selector\n- Even smaller `dimensions`\n- `event` fixes\n- `window` fixes\n- Clear `_eventCache` when all removed\n- Private `data` store\n- Replace `_eventCache`\n- `.one` support\n- `offset`\n\n### [v1.0.0](https://github.com/fabiospampinato/cash/releases/tag/1.0.0) (2015-02-06)\n\n- Available in npm as cash-dom now\n- Adding `is` documentation\n- Add UMD wrapper\n- Store references for better minifying\n- Fill out package.json\n- Clean up README\n- Merge pull request #40 from hackbone/umd\n- Conform to Airbnb JavaScript style guide\n- Arbitrary stylistic changes for readability\n- Minify dimensions better\n- Minify events better and cleanup\n- Alias slice and filter for minifying\n- fn reference for minifying\n- Clean up gulpfile and remove beautify\n- Build lib\n- Stop using arguments object when unnecessary for better minifying\n- Switch to ES6 with 6to5 and update linting\n- Return target in extend, improve minifying\n- Build lib\n- Remove \"use strict\" due to Safari HTMLCollection bug\n- Merge branch 'master' of https://github.com/thejameskyle/cash into thejameskyle-master\n- Removing strict from list\n- Merge branch 'thejameskyle-master'\n\n### [v0.0.3](https://github.com/fabiospampinato/cash/releases/tag/0.0.3) (2014-11-09)\n\n- Update README.md\n- Merge pull request #9 from richguan/patch-1\n- Merge pull request #7 from Fender123/master\n- Committing the `add` feature in response to #16\n- create tests for .add\n- allowing selector string input\n- fixing tests for selector string\n- Refactoring the $.fn.add method based on Ken's feedback, also update documentation and tests\n- Merge pull request #20 from simeydotme/master\n- add tests for parents, closest\n- updating documentation for closest and parents\n- change parents to closest and create new parents\n- Merge branch 'master' of https://github.com/simeydotme/cash\n- improve performance\n- test that HTML is last item in collection\n- Merge pull request #23 from simeydotme/master\n- Merge pull request #22 from vivekimsit/feature-closest-method\n- Remove deprecated JSHint options\n- `package.json` will always be 2 spaces\n- Merge pull request #26 from arthurvr/patch-2\n- Merge pull request #25 from arthurvr/patch-1\n- matches was throwing errors in IE9\n- fix up closest tests, and make the removeClass test more robust\n- fix merge error with .closest()\n- make .removeClass() more robust for IE9\n- dist files committed\n- improve the removeClass() function and performance slightly for IE9. removeClass will now accept space delimited class names for removal\n- Merge pull request #29 from simeydotme/fix-closest-and-removeclass\n- Making .each more performant via length caching. Fixing html() numeric input\n- Update README.md\n- Merge pull request #31 from simeydotme/patch-1\n- Fixing #32\n- Adds cash object support.\n- updating addClass function to allow multiple classes and to prevent duplicates in IE9\n- update tests for multiple classes and to detect duplicates\n- update dist files\n- Merge pull request #38 from simeydotme/patch-addclass-2\n- create a utility method to return a unique collection\n- update .parent(), .parents() and .add() to use $.unique()\n- update dist files and test cases\n- Merge pull request #37 from simeydotme/patch-parents-with-unique\n- Merge pull request #34 from vivekimsit/feature-add-is-support\n\n### [v0.0.2](https://github.com/fabiospampinato/cash/releases/tag/0.0.2) (2014-09-27)\n\n- Performance\n- Fixing readme\n- Fixing siblings, making qSA return array\n- Fixing `_` leak\n- Add bower.json\n- Merge pull request #3 from digitaljhelms/bower-json\n- First round of unit tests + bug fixes\n- Fixing README typo &amp; adding License\n- Fixes\n- Adding \"auto-off\" event registration and indexing\n- Bug Fixes\n- Updating delegate test and JSHint compat\n- delegate accuracy\n- updated outerWidth and innerWidth doc\n- Perf updates\n- Added a period(.) to the descriptions in README\n- Fixes #6 - Append and AppendTo can't chain\n- Merge pull request #10 from mienaikoe/master\n- Fixing html() &amp; append returns\n- Merge branch 'master' of https://github.com/kenwheeler/cash\n\n### [v0.0.1](https://github.com/fabiospampinato/cash/releases/tag/0.0.1) (2014-09-19)\n\n- Initial commit\n- README &amp; Homepage\n- Update README.md\n"
  },
  {
    "path": "docs/extending_cash.md",
    "content": "\n# Extending Cash\n\nCash can be extended, adding custom methods to Cash collections or custom static methods to the Cash object.\n\nIf you're writing JavaScript the way to do it is exactly the same as what you'd do for extending jQuery, but if you're writing TypeScript you'll want to take advantage of the type system, so in order to extend Cash you'll have to do a bit of [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html).\n\n## Collection Method\n\nThis is how you can add an hypothetical `foo` method to Cash collections:\n\n```ts\n/* IMPORTING */\n\nimport $ from 'cash-dom';\nimport {Cash} from 'cash-dom';\n\n/* DECLARATION MERGING */\n\ndeclare module 'cash-dom' {\n  interface Cash {\n    foo (): Cash\n  }\n}\n\n/* FOO DEFINITION */\n\n$.fn.foo = function ( this: Cash ): Cash {\n  // Do something here...\n  return this;\n}\n\n/* FOO USAGE */\n\n$('*').foo ();\n```\n\n## Static Method\n\nThis is how you can add an hypothetical `foo` static method to the Cash object:\n\n```ts\n/* IMPORTING */\n\nimport $ from 'cash-dom';\nimport {CashStatic} from 'cash-dom';\n\n/* DECLARATION MERGING */\n\ndeclare module 'cash-dom' {\n  interface CashStatic {\n    foo (): number\n  }\n}\n\n/* FOO DEFINITION */\n\n$.foo = function (): number {\n  // Do something here...\n  return 123;\n}\n\n/* FOO USAGE */\n\n$.foo ();\n```\n"
  },
  {
    "path": "docs/migration_guide.md",
    "content": "\n# Migration Guide\n\nWhile Cash doesn't implement every feature that jQuery provides, everything that it implements should be compatible with jQuery, but there are some minor differences to be aware of and they are listed in this document.\n\n## Attributes\n\n### Booleans\n\nBoolean attributes are: `checked`, `selected`, `async`, `autofocus`, `autoplay`, `controls`, `defer`, `disabled`, `hidden`, `ismap`, `loop`, `multiple`, `open`, `readonly`, `required`, `scoped`.\n\njQuery handles boolean attributes specially, potentially setting a different value than the one you passed it and updating the corresponding properties as well.\n\nCash just handles them like any other attribute instead.\n\n## CSS\n\n### Relative values\n\njQuery supports relative CSS values.\n\n```javascript\n$('#foo').css ( 'padding-left', '+=10' );\n```\n\nCash doesn't support this.\n\n## Data\n\n### Caching\n\njQuery's `$.fn.data` function caches retrieved values, and doesn't refresh them when they are updated outside of jQuery (e.g. via the `dataset` API), this makes jQuery's `$.fn.data` function unusable with libraries like React.\n\nCash doesn't implement such caching functionality and doesn't have this problem, the retrieved values are always fresh.\n\nAlso values set via Cash's `$.fn.data` function are stored as JSON values in `data-*` attributes set on the DOM nodes, so for instance calling `$('#foo').data ( 'test', 123 )` will add the `data-test=\"123\"` attribute to the `#foo` node, as a concequence of this values that are not JSON-serializable are not supported.\n\n### Plain objects\n\njQuery supports handling data on plain objects.\n\n```javascript\n$({}).data ( 'foo', 123 );\n```\n\nCash doesn't support this.\n\n## Dimensions\n\n### Hidden elements\n\nIf you're trying to retrieve the width/height of an hidden element jQuery will briefly try to render it in order to compute it's dimension, this is unreliable and should be avoided.\n\nCash doesn't implement such functionality.\n\nIf you need this anyway you'll have to show/hide the element on your own:\n\n```javascript\n// jQuery\n$('#foo').width ();\n// Cash\n$('#foo').show ();\n$('#foo').width ();\n$('#foo').hide ();\n```\n\n### Negative dimension\n\nA negative width/height gets automatically converted to `0` by jQuery, both when setting it via `$.fn.width|height` or `$.fn.css`.\n\nCash discourages you from setting a negative width/height, if you want this to work like jQuery you'll have to convert negative values to `0` on your own:\n\n```javascript\n// jQuery\n$('#foo').width ( myWidth );\n$('#foo').css ( width, myWidth );\n$('#foo').css ({ width: myWidth });\n// Cash\nmyWidth = Math.max ( 0, parseFloat ( myWidth ) );\n$('#foo').width ( myWidth );\n$('#foo').css ( width, myWidth );\n$('#foo').css ({ width: myWidth });\n```\n\n### Transformed element\n\njQuery ignores any `transform` applied to the element when computing its dimensions.\n\nCash doesn't.\n\nYou may try reading untransformed dimensions with the `$.fn.css` method instead.\n\n## Events\n\nCash's event system relies heavily on the browser's underlying event system so there are some differences when comparing it with jQuery's.\n\n### Custom methods\n\njQuery provides some custom event methods.\n\n```javascript\nevent.isDefaultPrevented ();\nevent.isPropagationStopped ();\nevent.isImmediatePropagationStopped ();\nevent.originalEvent;\n```\n\nCash doesn't provide them, as it simply passes along the raw event object instead.\n\n```javascript\nevent.defaultPrevented;\nevent.cancelBubble;\n// No way of knowing if `stopImmediatePropagation` was called\nevent;\n```\n\n### Stopping propagation from a delegated event handler\n\nIn Cash when using event delegation calling `event.stopPropagation` or returning `false` stops the propagation from the target element, not the delegate element.\n\nThere's no perfect workaround for this unfortunately, but in most practical cases you could call `event.stopImmediatePropagation` instead.\n\n```javascript\n// jQuery\n$('#foo').on ( 'click', '.bar', event => false ); // First function called\n$('#foo').on ( 'click', '.bar', event => {} ); // Second function called\n$('#foo').on ( 'click', event => {} ); // Function never called\n$('.bar').trigger ( 'click' );\n// Cash\n$('#foo').on ( 'click', '.bar', event => false ); // First function called\n$('#foo').on ( 'click', '.bar', event => {} ); // Second function called\n$('#foo').on ( 'click', event => {} ); // Third function called\n$('.bar').trigger ( 'click' );\n// Cash + \"stopImmediatePropagation\"\n$('#foo').on ( 'click', '.bar', event => { // First function called\n  event.stopImmediatePropagation ();\n});\n$('#foo').on ( 'click', '.bar', event => {} ); // Function never called\n$('#foo').on ( 'click', event => {} ); // Function never called\n$('.bar').trigger ( 'click' );\n```\n\n### Trigger data\n\njQuery supports passing multiple data arguments to your event handlers by providing an array of data arguments to `$.fn.trigger`.\n\nCash doesn't support this, whatever you provide as a data argument will be passed through as is, even if it's an array.\n\n### Plain objects\n\njQuery supports handling events on plain objects.\n\n```javascript\n$({}).on ( 'foo', () => {} );\n```\n\nCash doesn't support this.\n\n## Manipulation\n\n### Inserting plain text\n\njQuery supports inserting plain text using different methods (`$.fn.after`, `$.fn.append` etc.).\n\n```javascript\n$('.foo').append ( 'something' );\n```\n\nCash doesn't support that because it instead supports receiving a selector as an argument, and that can be ambigous when also supporting plain text.\n\n```javascript\n$('.foo').append ( '.foo' ); // Is that a target or do we actually wanto to append \".foo\"?\n```\n\nIn Cash you should generally wrap your plain texts in a `<span>` element, or create a `textNode` node manually.\n\n```javascript\n$('.foo').append ( '<span>something</span>' );\n$('.foo').append ( document.createTextNode ( 'something' ) );\n```\n\n## Parsing\n\n### Malformed HTML\n\njQuery smooths over many details and attempts to correctly parse malformed HTML.\n\n```javascript\n$('<div/><hr/><code/><b/>').length // => 4\n```\n\nCash on the other hand for the most part just lets the browser handle your HTML directly, so it behaves more strictly and you should be more careful about the HTML strings you're passing to it.\n\n```javascript\n$('<div/><hr/><code/><b/>').length // => 1\n```\n\n## Selectors\n\n### Custom selectors\n\njQuery implements many custom selectors, like `:hidden`.\n\nCash only supports selectors the browser recognizes as valid, everything else will throw an error.\n\n### Binary operators\n\nSome CSS operators are binary, they operate on something before and after them: `>`, `~`, `+`.\n\njQuery allows you to use them at the beginning of your selectors inside `$.fn.find`, in a unary fashion.\n\nCash only supports selectors the browser recognizes as valid, so you can't just use `> .bar` like you sometimes can with jQuery.\n\nIf you only target modern browsers you could use the [`:scope`](https://developer.mozilla.org/en-US/docs/Web/CSS/:scope) CSS pseudo-class.\n\n```javascript\n// jQuery\n$('#foo').find ( '> .bar' );\n$('#foo').find ( '~ .bar' );\n$('#foo').find ( '+ .bar' );\n// Cash\n$('#foo').children ( '.bar' );\n$('#foo').nextAll ( '.bar' );\n$('#foo').next ( '.bar' );\n// Cash + \":scope\"\n$('#foo').find ( ':scope > .bar' );\n$('#foo').find ( ':scope ~ .bar' );\n$('#foo').find ( ':scope + .bar' );\n```\n\n## Utilities\n\n### Unique\n\njQuery's `$.unique` function only works with DOM nodes.\n\nCash's `$.unique` function works with any kind of value.\n\n## Others\n\nOther general differences to be aware of.\n\n### Disconnected nodes, iframes and SVGs\n\njQuery handles specially disconnected nodes, iframes and SVGs, smoothing over many rough corners and just making their APIs \"work\".\n\nCash doesn't smooth over as many rough corners (yet?), so you should test more carefully the portions of your code that deal with those kind of objects.\n\n### Function that returns a value\n\njQuery accepts in many methods a function that returns a value, other than just the value itself.\n\n```javascript\n$('#foo').attr ( 'bar', () => Math.random () );\n```\n\nCash doesn't support this.\n\n### Sort order\n\nElements inside Cash and jQuery collections may be sorted differently.\n\n## Contributing\n\nDid you find another difference between jQuery and Cash during your migration? Please add that to this page so that future migrations will be smoother for others.\n"
  },
  {
    "path": "docs/partial_builds.md",
    "content": "\n# Partial Builds\n\nCash is bundled using [minipacco](https://github.com/fabiospampinato/minipacco), therefore it supports partial builds out of the box.\n\n## Guide\n\nReplace the content of [`src/methods.ts`](https://github.com/fabiospampinato/cash/tree/master/src/methods.ts) with your custom configuration, basically deleting imports for methods that you don't want, then you can simply rebuild the library with:\n\n```sh\nnpm install\nnpm run build\n```\n"
  },
  {
    "path": "license",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014-2020 Ken Wheeler, 2020-present Fabio Spampinato\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"cash-dom\",\n  \"repository\": \"github:fabiospampinato/cash\",\n  \"description\": \"An absurdly small jQuery alternative for modern browsers.\",\n  \"version\": \"8.1.5\",\n  \"license\": \"MIT\",\n  \"browser\": \"./dist/cash.js\",\n  \"main\": \"./dist/cash.js\",\n  \"module\": \"./dist/cash.esm.js\",\n  \"jsnext:main\": \"./dist/cash.esm.js\",\n  \"types\": \"dist/cash.d.ts\",\n  \"files\": [\n    \"dist\"\n  ],\n  \"scripts\": {\n    \"build\": \"bash ./tasks/build.sh\",\n    \"watch\": \"monex --watch src --exec npm:build\",\n    \"dev\": \"npm run build && npm run watch\",\n    \"test\": \"open ./test/index.html\",\n    \"test:jquery:init\": \"( git -C ./test/jquery reset --hard HEAD && git -C ./test/jquery pull ) || git clone https://github.com/jquery/jquery.git ./test/jquery\",\n    \"test:jquery\": \"npm run test:jquery:init && npm run test:jquery:build && cd ./test/jquery && npm i && opn http://localhost:4444/test/index.html\\\\?module=css && php -S localhost:4444\",\n    \"test:jquery:build\": \"cat ./node_modules/jquery/dist/jquery.js ./dist/cash.js ./test/jquery_patch.js > ./test/jquery/dist/jquery.js && cp ./test/jquery/dist/jquery.js ./test/jquery/dist/jquery.min.js\",\n    \"test:jquery:build:watch\": \"while sleep 1; do npm run test:jquery:build; done\",\n    \"test:jquery:reverse\": \"npm run test:jquery:init && npm run test:jquery:reverse:build && npm run test:watch\",\n    \"test:jquery:reverse:build\": \"cat ./node_modules/jquery/dist/jquery.js ./dist/cash.min.js ./test/jquery_reverse_patch.js > ./dist/cash.js\",\n    \"test:jquery:reverse:build:watch\": \"while sleep 1; do npm run test:jquery:reverse:build; done\",\n    \"test:playwright\": \"node ./test/playwright.mjs\",\n    \"graph\": \"minipacco graph src/export_esm.ts\",\n    \"prepublishOnly\": \"npm run build && npm run test:playwright\"\n  },\n  \"devDependencies\": {\n    \"esbuild\": \"^0.17.10\",\n    \"jquery\": \"^3.6.3\",\n    \"minipacco\": \"^1.0.4\",\n    \"monex\": \"^2.0.0\",\n    \"playwright\": \"^1.30.0\",\n    \"qunit\": \"^2.19.4\",\n    \"qunit-ava-spec\": \"^2.0.0\",\n    \"tiny-colors\": \"^2.0.2\",\n    \"typescript\": \"^4.9.5\"\n  }\n}\n"
  },
  {
    "path": "readme.md",
    "content": "\n<p align=\"center\">\n  <img src=\"./resources/logo/logo.png\" alt=\"Cash Logo\" width=\"400px\">\n</p>\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 & 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<script src=\"https://cdn.jsdelivr.net/npm/cash-dom/dist/cash.min.js\"></script>\n<script>\n  $(function () {\n    $('html').addClass ( 'dom-loaded' );\n    $('<footer>Appended with Cash</footer>').appendTo ( document.body );\n  });\n</script>\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  $('<footer>Appended with Cash</footer>').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] ) // => collection, using `element` as the context\n$( selector [, collection] ) // => collection, using `collection` as the context\n$(node) // => collection\n$(nodeList) // => collection\n$(htmlString) // => collection\n$(collection) // => self\n$(function () {}) // => 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 ) // => 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 // => 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 ) // => collection\n$(element).add ( selector ) // => collection\n$(element).add ( collection ) // => 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 ) // => collection\n```\n\n#### fn.after ()\n\nInserts content or elements after the collection.\n\n```js\n$(element).after ( element ) // => collection\n$(element).after ( htmlString ) // => collection\n$(element).after ( content [, content] ) // => collection\n```\n\n#### fn.append ()\n\nAppends content or elements to each element in the collection.\n\n```js\n$(element).append ( element ) // => collection\n$(element).append ( htmlString ) // => collection\n$(element).append ( content [, content] ) // => 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 ) // => 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 ) // => collection\n$(element).attr ( object ) // => collection\n```\n\n#### fn.before ()\n\nInserts content or elements before the collection.\n\n```js\n$(element).before ( element ) // => collection\n$(element).before ( htmlString ) // => collection\n$(element).before ( content [, content] ) // => 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 () // => collection\n$(element).children ( selector ) // => collection\n```\n\n#### fn.closest ()\n\nReturns the closest matching selector up the DOM tree.\n\n```js\n$(element).closest ( selector ) // => 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 ( '*' ) // => collection\n```\n\n#### fn.clone ()\n\nReturns a collection with cloned elements.\n\n```js\n$(element).clone () // => collection\n```\n\n#### fn.detach ()\n\nRemoves collection elements, optionally that match the selector, from the DOM.\n\n```js\n$(element).detach () // => collection\n$(element).detach ( selector ) // => 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 ) // => value\n$(element).css ( property, value ) // => collection\n$(element).css ( object ) // => 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 () // => object\n$(element).data ( key ) // => value\n$(element).data ( key, value ) // => collection\n$(element).data ( object ) // => 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 ) // => collection\n```\n\n#### fn.empty ()\n\nEmpties the elements interior markup.\n\n```js\n$(element).empty () // => collection\n```\n\n#### fn.eq ()\n\nReturns a collection with the element at index.\n\n```js\n$(element).eq ( index ) // => collection\n```\n\n#### fn.extend ()\n\nAdds properties to the Cash collection prototype.\n\n```js\n$.fn.extend ( object ) // => 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 ) // => collection\n$(element).filter ( function ( index, element ) {} ) // => 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 ) // => collection\n```\n\n#### fn.first ()\n\nReturns a collection containing only the first element.\n\n```js\n$(element).first () // => collection\n```\n\n#### fn.get ()\n\nReturns the element at the index, or returns all elements.\n\n```js\n$(element).get ( index ) // => domNode\n$(element).get () // => 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 ) // => collection\n$(element).has ( element ) // => 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 ) // => boolean\n```\n\n#### fn.height ()\n\nReturns or sets the height of the element.\n\n```js\n$(element).height () // => Integer\n$(element).height ( number ) // => collection\n```\n\n#### fn.hide ()\n\nHide the elements.\n\n```js\n$(element).hide () // => 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 () // => HTML Text\n$(element).html ( htmlString ) // => 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 () // => Integer\n$(element).index ( element ) // => Integer\n```\n\n#### fn.innerHeight ()\n\nReturns the height of the element + padding.\n\n```js\n$(element).innerHeight () // => Integer\n```\n\n#### fn.innerWidth ()\n\nReturns the width of the element + padding.\n\n```js\n$(element).innerWidth () // => Integer\n```\n\n#### fn.insertAfter ()\n\nInserts collection after specified element.\n\n```js\n$(element).insertAfter ( element ) // => collection\n```\n\n#### fn.insertBefore ()\n\nInserts collection before specified element.\n\n```js\n$(element).insertBefore ( element ) // => 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 ) // => boolean\n```\n\n#### fn.last ()\n\nReturns a collection containing only the last element.\n\n```js\n$(element).last () // => 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 ) // => collection\n```\n\n#### fn.next ()\n\nReturns the next adjacent elements.\n\n```js\n$(element).next () // => collection\n$(element).next ( selector ) // => collection\n```\n\n#### fn.nextAll ()\n\nReturns all the next elements.\n\n```js\n$(element).nextAll () // => collection\n$(element).nextAll ( selector ) // => collection\n```\n\n#### fn.nextUntil ()\n\nReturns all the next elements, until the provided selector matches.\n\n```js\n$(element).nextUntil ( selector ) // => collection\n$(element).nextUntil ( selector, filterSelector ) // => collection\n```\n\n#### fn.not ()\n\nFilters collection by false match on collection/selector.\n\n```js\n$(element).not ( selector ) // => collection\n$(element).not ( collection ) // => 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 ) // => collection\n$(element).off ( eventName ) // => collection\n$(element).off ( eventsMap ) // => collection\n$(element).off () // => 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 () // => Object\n```\n\n#### fn.offsetParent ()\n\nGet the first element's ancestor that's positioned.\n\n```js\n$(element).offsetParent () // => 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 ) // => collection\n$(element).on ( eventName, eventHandler ) // => collection\n$(element).on ( eventName, delegate, eventHandler ) // => 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 ) // => collection\n$(element).one ( eventName, delegate, eventHandler ) // => 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 () // => Integer\n$(element).outerHeight ( includeMargins ) // => 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 () // => Integer\n$(element).outerWidth ( includeMargins ) // => Integer\n```\n\n#### fn.parent ()\n\nReturns collection of elements who are parent of elements.\n\n```js\n$(element).parent () // => collection\n$(element).parent ( selector ) // => 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 () // => collection\n$(element).parents ( selector ) // => 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 ) // => collection\n$(element).parentsUntil ( selector, filterSelector ) // => 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 () // => object\n```\n\n#### fn.prepend ()\n\nPrepends content or elements to the each element in collection.\n\n```js\n$(element).prepend ( element ) // => collection\n$(element).prepend ( htmlString ) // => collection\n$(element).prepend ( content [, content] ) // => collection\n```\n\n#### fn.prependTo ()\n\nPrepends elements in a collection to the target element(s).\n\n```js\n$(element).prependTo ( element ) // => collection\n```\n\n#### fn.prev ()\n\nReturns the previous adjacent elements.\n\n```js\n$(element).prev () // => collection\n$(element).prev ( selector ) // => collection\n```\n\n#### fn.prevAll ()\n\nReturns all the previous elements.\n\n```js\n$(element).prevAll () // => collection\n$(element).prevAll ( selector ) // => collection\n```\n\n#### fn.prevUntil ()\n\nReturns all the previous elements, until the provided selector matches.\n\n```js\n$(element).prevUntil ( selector ) // => collection\n$(element).prevUntil ( selector, filterSelector ) // => 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 ) // => property value\n$(element).prop ( property, value ) // => collection\n$(element).prop ( object ) // => collection\n```\n\n#### fn.ready ()\n\nCalls callback method on DOMContentLoaded.\n\n```js\n$(document).ready ( callback ) // => 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 () // => collection\n$(element).remove ( selector ) // => 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 ) // => collection\n```\n\n#### fn.replaceWith ()\n\nReplace collection elements with the provided new content.\n\n```js\n$(element).replaceWith ( content ) // => 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 ) // => 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 () // => collection\n$(element).removeClass ( className ) // => collection\n```\n\n#### fn.removeProp ()\n\nRemoves property from collection elements.\n\n```js\n$(element).removeProp ( propName ) // => collection\n```\n\n#### fn.serialize ()\n\nWhen called on a form, serializes and returns form data.\n\n```js\n$(form).serialize () // => String\n```\n\n#### fn.show ()\n\nShow the elements.\n\n```js\n$(element).show () // => collection\n```\n\n#### fn.siblings ()\n\nReturns a collection of sibling elements.\n\n```js\n$(element).siblings () // => collection\n$(element).siblings ( selector ) // => 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 ) // => 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 () // => text\n$(element).text ( textContent ) // => collection\n```\n\n#### fn.toggle ()\n\nHide or show the elements.\n\n```js\n$(element).toggle () // => collection\n$(element).toggle ( force ) // => 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 ) // => collection\n$(element).toggleClass ( className, force ) // => 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 ) // => collection\n$(element).trigger ( eventObj ) // => collection\n$(element).trigger ( eventName, data ) // => collection\n$(element).trigger ( eventObj, data ) // => collection\n```\n\n#### fn.unwrap ()\n\nRemoves the wrapper from all elements.\n\n```js\n$(element).unwrap () // => 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 () // => value\n$(input).val ( value ) // => collection\n```\n\n#### fn.width ()\n\nReturns or sets the width of the element.\n\n```js\n$(element).width () // => number\n$(element).width ( number ) // => collection\n```\n\n#### fn.wrap ()\n\nWraps a structure around each element.\n\n```js\n$(element).wrap ( structure ) // => collection\n```\n\n#### fn.wrapAll ()\n\nWraps a structure around all elements.\n\n```js\n$(element).wrapAll ( structure ) // => collection\n```\n\n#### fn.wrapInner ()\n\nWraps a structure around all children.\n\n```js\n$(element).wrapInner ( structure ) // => 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 ) // => 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++ // => 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 ) // => array\n$.each ( object, callback ) // => 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 ) // => object\n$.extend ( true, target, source ) // => object\n```\n\n#### $.isArray ()\n\nCheck if the argument is an array.\n\n```js\n$.isArray ([ 1, 2, 3 ]) // => true\n```\n\n#### $.isFunction ()\n\nCheck if the argument is a function.\n\n```js\nfunction fn () {};\n$.isFunction ( fn ) // => true\n```\n\n#### $.isNumeric ()\n\nCheck if the argument is numeric.\n\n```js\n$.isNumeric ( 57 ) // => true\n```\n\n#### $.isPlainObject ()\n\nCheck if the argument is a plain object.\n\n```js\n$.isPlainObject ( {} ) // => true\n```\n\n#### $.isWindow ()\n\nCheck if the argument is a Window object.\n\n```js\n$.isWindow ( window ) // => true\n```\n\n#### $.parseHTML ()\n\nReturns a collection from an HTML string.\n\n```js\n$.parseHTML ( htmlString ) // => collection\n```\n\n#### $.unique ()\n\nReturns a new array with duplicates removed.\n\n```js\n$.unique ( array ) // => 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"
  },
  {
    "path": "src/attributes/add_class.ts",
    "content": "\n// @require core/cash.ts\n// @require ./toggle_class.ts\n\ninterface Cash {\n  addClass ( classes: string ): this;\n}\n\nfn.addClass = function ( this: Cash, cls: string ) {\n\n  return this.toggleClass ( cls, true );\n\n};\n"
  },
  {
    "path": "src/attributes/attr.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./remove_attr.ts\n\ninterface Cash {\n  attr (): undefined;\n  attr ( attrs: string ): string | null;\n  attr ( attrs: string, value: string ): this;\n  attr ( attrs: Record<string, string> ): this;\n}\n\nfunction attr ( this: Cash ): undefined;\nfunction attr ( this: Cash, attr: string ): string | null;\nfunction attr ( this: Cash, attr: string, value: string ): Cash;\nfunction attr ( this: Cash, attr: Record<string, string> ): Cash;\nfunction attr ( this: Cash, attr?: string | Record<string, string>, value?: string ) {\n\n  if ( !attr ) return;\n\n  if ( isString ( attr ) ) {\n\n    if ( arguments.length < 2 ) {\n\n      if ( !this[0] || !isElement ( this[0] ) ) return;\n\n      const value = this[0].getAttribute ( attr );\n\n      return isNull ( value ) ? undefined : value;\n\n    }\n\n    if ( isUndefined ( value ) ) return this;\n\n    if ( isNull ( value ) ) return this.removeAttr ( attr );\n\n    return this.each ( ( i, ele ) => {\n\n      if ( !isElement ( ele ) ) return;\n\n      ele.setAttribute ( attr, value )\n\n    });\n\n  }\n\n  for ( const key in attr ) {\n\n    this.attr ( key, attr[key] );\n\n  }\n\n  return this;\n\n}\n\nfn.attr = attr;\n"
  },
  {
    "path": "src/attributes/has_class.ts",
    "content": "\n// @require core/cash.ts\n// @require core/get_split_values.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n\ninterface Cash {\n  hasClass ( cls: string ): boolean;\n}\n\nfn.hasClass = function ( this: Cash, cls: string ) {\n\n  return !!cls && some.call ( this, ( ele: EleLoose ) => isElement ( ele ) && ele.classList.contains ( cls ) );\n\n};\n"
  },
  {
    "path": "src/attributes/helpers/variables.ts",
    "content": "\nconst propMap: Record<string, string> = {\n  /* GENERAL */\n  class: 'className',\n  contenteditable: 'contentEditable',\n  /* LABEL */\n  for: 'htmlFor',\n  /* INPUT */\n  readonly: 'readOnly',\n  maxlength: 'maxLength',\n  tabindex: 'tabIndex',\n  /* TABLE */\n  colspan: 'colSpan',\n  rowspan: 'rowSpan',\n  /* IMAGE */\n  usemap: 'useMap'\n};\n"
  },
  {
    "path": "src/attributes/prop.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./helpers/variables.ts\n\ninterface Cash {\n  prop ( prop: string ): any;\n  prop ( prop: string, value: any ): this;\n  prop ( props: Record<string, any> ): this;\n}\n\nfn.prop = function ( this: Cash, prop: string | Record<string, any>, value?: any ) {\n\n  if ( !prop ) return;\n\n  if ( isString ( prop ) ) {\n\n    prop = propMap[prop] || prop;\n\n    if ( arguments.length < 2 ) return this[0] && this[0][prop];\n\n    return this.each ( ( i, ele ) => { ele[prop] = value } );\n\n  }\n\n  for ( const key in prop ) {\n\n    this.prop ( key, prop[key] );\n\n  }\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/attributes/remove_attr.ts",
    "content": "\n// @require core/cash.ts\n// @require core/get_split_values.ts\n// @require collection/each.ts\n\ninterface Cash {\n  removeAttr ( attrs: string ): this;\n}\n\nfn.removeAttr = function ( this: Cash, attr: string ) {\n\n  const attrs = getSplitValues ( attr );\n\n  return this.each ( ( i, ele ) => {\n\n    if ( !isElement ( ele ) ) return;\n\n    each ( attrs, ( i, a ) => {\n\n      ele.removeAttribute ( a );\n\n    });\n\n  });\n\n};\n"
  },
  {
    "path": "src/attributes/remove_class.ts",
    "content": "\n// @require core/cash.ts\n// @require ./attr.ts\n// @require ./toggle_class.ts\n\ninterface Cash {\n  removeClass ( classes?: string ): this;\n}\n\nfn.removeClass = function ( this: Cash, cls?: string ) {\n\n  if ( arguments.length ) return this.toggleClass ( cls, false );\n\n  return this.attr ( 'class', '' );\n\n};\n"
  },
  {
    "path": "src/attributes/remove_prop.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/each.ts\n// @require ./helpers/variables.ts\n\ninterface Cash {\n  removeProp ( prop: string ): this;\n}\n\nfn.removeProp = function ( this: Cash, prop: string ) {\n\n  return this.each ( ( i, ele ) => { delete ele[propMap[prop] || prop] } );\n\n};\n"
  },
  {
    "path": "src/attributes/toggle_class.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/get_split_values.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n\ninterface Cash {\n  toggleClass ( classes: string, force?: boolean ): this;\n}\n\nfn.toggleClass = function ( this: Cash, cls: string, force?: boolean ) {\n\n  const classes = getSplitValues ( cls );\n  const isForce = !isUndefined ( force );\n\n  return this.each ( ( i, ele ) => {\n\n    if ( !isElement ( ele ) ) return;\n\n    each ( classes, ( i, c ) => {\n\n      if ( isForce ) {\n\n        force ? ele.classList.add ( c ) : ele.classList.remove ( c );\n\n      } else {\n\n        ele.classList.toggle ( c );\n\n      }\n\n    });\n\n  });\n\n};\n"
  },
  {
    "path": "src/collection/add.ts",
    "content": "\n// @require core/cash.ts\n// @require core/unique.ts\n// @require ./get.ts\n\ninterface Cash {\n  add ( selector: Selector, context?: Context ): Cash;\n}\n\nfn.add = function ( this: Cash, selector: Selector, context?: Context ) {\n\n  return cash ( unique ( this.get ().concat ( cash ( selector, context ).get () ) ) );\n\n};\n"
  },
  {
    "path": "src/collection/each.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n\ninterface Cash {\n  each ( callback: EachArrayCallback<EleLoose> ): this;\n}\n\nfn.each = function ( this: Cash, callback: EachArrayCallback<EleLoose> ) {\n\n  return each ( this, callback );\n\n};\n"
  },
  {
    "path": "src/collection/eq.ts",
    "content": "\n// @require core/cash.ts\n// @require ./get.ts\n\ninterface Cash {\n  eq ( index: number ): Cash;\n}\n\nfn.eq = function ( this: Cash, index: number ) {\n\n  return cash ( this.get ( index ) );\n\n};\n"
  },
  {
    "path": "src/collection/filter.ts",
    "content": "\n// @require core/cash.ts\n// @require core/get_compare_function.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require collection/get.ts\n\ninterface Cash {\n  filter ( comparator?: Comparator ): Cash;\n}\n\nfn.filter = function ( this: Cash, comparator?: Comparator ) {\n\n  const compare = getCompareFunction ( comparator );\n\n  return cash ( filter.call ( this, ( ele: EleLoose, i: number ) => compare.call ( ele, i, ele ) ) );\n\n};\n"
  },
  {
    "path": "src/collection/first.ts",
    "content": "\n// @require core/cash.ts\n// @require ./eq.ts\n\ninterface Cash {\n  first (): Cash;\n}\n\nfn.first = function ( this: Cash ) {\n\n  return this.eq ( 0 );\n\n};\n"
  },
  {
    "path": "src/collection/get.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n\ninterface Cash {\n  get (): EleLoose[];\n  get ( index: number ): EleLoose | undefined;\n}\n\nfn.get = function ( this: Cash, index?: number ) {\n\n  if ( isUndefined ( index ) ) return slice.call ( this );\n\n  index = Number ( index );\n\n  return this[index < 0 ? index + this.length : index];\n\n};\n"
  },
  {
    "path": "src/collection/index.ts",
    "content": "\n// @require core/cash.ts\n// @require core/variables.ts\n// @require traversal/children.ts\n// @require traversal/parent.ts\n// @require ./get.ts\n\ninterface Cash {\n  index ( selector?: Selector ): number;\n}\n\nfn.index = function ( this: Cash, selector?: Selector ) {\n\n  const child = selector ? cash ( selector )[0] : this[0];\n  const collection = selector ? this : cash ( child ).parent ().children ();\n\n  return indexOf.call ( collection, child );\n\n};\n"
  },
  {
    "path": "src/collection/last.ts",
    "content": "\n// @require core/cash.ts\n// @require ./eq.ts\n\ninterface Cash {\n  last (): Cash;\n}\n\nfn.last = function ( this: Cash ) {\n\n  return this.eq ( -1 );\n\n};\n"
  },
  {
    "path": "src/collection/map.ts",
    "content": "\n// @require core/cash.ts\n// @require core/variables.ts\n\ntype MapCallback<T> = ( this: T, index: number, ele: T ) => Ele;\n\ninterface Cash {\n  map ( callback: MapCallback<EleLoose> ): Cash;\n}\n\nfn.map = function ( this: Cash, callback: MapCallback<EleLoose> ) {\n\n  return cash ( concat.apply ( [], map.call ( this, ( ele: EleLoose, i: number ) => callback.call ( ele, i, ele ) ) ) );\n\n};\n"
  },
  {
    "path": "src/collection/slice.ts",
    "content": "\n// @require core/cash.ts\n// @require core/variables.ts\n\ninterface Cash {\n  slice ( start?: number, end?: number ): Cash;\n}\n\nfn.slice = function ( this: Cash, start?: number, end?: number ) {\n\n  return cash ( slice.call ( this, start, end ) );\n\n};\n"
  },
  {
    "path": "src/core/attempt.ts",
    "content": "\nfunction attempt<T, U> ( fn: (( arg?: U ) => T), arg?: U ): T | U {\n\n  try {\n\n    return fn ( arg );\n\n  } catch {\n\n    return arg;\n\n  }\n\n}\n"
  },
  {
    "path": "src/core/camel_case.ts",
    "content": "\n// @require ./cash.ts\n\nconst dashAlphaRe = /-([a-z])/g;\n\nfunction camelCase ( str: string ): string {\n\n  return str.replace ( dashAlphaRe, ( match: string, letter: string ) => letter.toUpperCase () );\n\n}\n"
  },
  {
    "path": "src/core/cash.ts",
    "content": "\n// @require ./find.ts\n// @require ./variables.ts\n\nclass Cash {\n\n  constructor ( selector?: Selector, context?: Context | Cash ) {\n\n    if ( !selector ) return;\n\n    if ( isCash ( selector ) ) return selector;\n\n    let eles: any = selector;\n\n    if ( isString ( selector ) ) {\n\n      const ctx = context || doc;\n\n      eles = idRe.test ( selector ) && isDocument ( ctx )\n                ? ctx.getElementById ( selector.slice ( 1 ).replace ( /\\\\/g, '' ) )\n                : htmlRe.test ( selector )\n                  ? parseHTML ( selector )\n                  : isCash ( ctx )\n                    ? ctx.find ( selector )\n                      : isString ( ctx )\n                        ? cash ( ctx ).find ( selector )\n                        : find ( selector, ctx );\n\n      if ( !eles ) return;\n\n    } else if ( isFunction ( selector ) ) {\n\n      return this.ready ( selector ); //FIXME: `fn.ready` is not included in `core`, but it's actually a core functionality\n\n    }\n\n    if ( eles.nodeType || eles === win ) eles = [eles];\n\n    this.length = eles.length;\n\n    for ( let i = 0, l = this.length; i < l; i++ ) {\n\n      this[i] = eles[i];\n\n    }\n\n  }\n\n  init ( selector?: Selector, context?: Context | Cash ) {\n\n    return new Cash ( selector, context );\n\n  }\n\n}\n\nconst fn = Cash.prototype;\nconst cash = fn.init as ( typeof Cash.prototype.init & CashStatic );\n\ncash.fn = cash.prototype = fn; // Ensuring that `cash () instanceof cash`\n\nfn.length = 0;\nfn.splice = splice; // Ensuring a cash collection gets printed as array-like in Chrome's devtools\n\nif ( typeof Symbol === 'function' ) { // Ensuring a cash collection is iterable\n  fn[Symbol['iterator']] = ArrayPrototype[Symbol['iterator']];\n}\n"
  },
  {
    "path": "src/core/each.ts",
    "content": "\n// @require ./cash.ts\n// @require ./type_checking.ts\n\ntype EachArrayCallback<T> = ( this: T, index: number, ele: T ) => any;\ntype EachObjectCallback<T> = ( this: T, key: string, value: T ) => any;\n\ninterface CashStatic {\n  each<T> ( arr: ArrayLike<T>, callback: EachArrayCallback<T> ): void;\n  each<T> ( obj: PlainObject<T>, callback: EachObjectCallback<T> ): void;\n}\n\nfunction each<T, U extends ArrayLike<T> = ArrayLike<T>> ( arr: U, callback: EachArrayCallback<T>, _reverse?: boolean ): U;\nfunction each<T, U extends PlainObject<T> = PlainObject<T>> ( obj: U, callback: EachObjectCallback<T> ): U;\nfunction each<T, U extends ArrayLike<T> | PlainObject<T> = ArrayLike<T>> ( arr: U, callback: EachArrayCallback<T> | EachObjectCallback<T>, _reverse?: boolean ): U {\n\n  if ( _reverse ) {\n\n    let i = arr.length;\n\n    while ( i-- ) {\n\n      if ( callback.call ( arr[i], i, arr[i] ) === false ) return arr;\n\n    }\n\n  } else if ( isPlainObject ( arr ) ) {\n\n    const keys = Object.keys ( arr );\n\n    for ( let i = 0, l = keys.length; i < l; i++ ) {\n\n      const key = keys[i];\n\n      if ( callback.call ( arr[key], key, arr[key] ) === false ) return arr;\n\n    }\n\n  } else {\n\n    for ( let i = 0, l = arr.length; i < l; i++ ) {\n\n      if ( callback.call ( arr[i], i, arr[i] ) === false ) return arr;\n\n    }\n\n  }\n\n  return arr;\n\n}\n\ncash.each = each;\n"
  },
  {
    "path": "src/core/extend.ts",
    "content": "\n// @require ./cash.ts\n// @require ./type_checking.ts\n\ninterface CashStatic {\n  extend (): any;\n  extend ( deep: true, target: any, ...sources: any[] ): any;\n  extend ( target: any ): typeof cash;\n  extend ( target: any, ...sources: any[] ): any;\n}\n\ninterface Cash {\n  extend ( plugins: Record<any, any> ): this;\n}\n\nfunction extend ( ...sources: any[] ) {\n\n  const deep = isBoolean ( sources[0] ) ? sources.shift () : false;\n  const target = sources.shift ();\n  const length = sources.length;\n\n  if ( !target ) return {};\n\n  if ( !length ) return extend ( deep, cash, target );\n\n  for ( let i = 0; i < length; i++ ) {\n\n    const source = sources[i];\n\n    for ( const key in source ) {\n\n      if ( deep && ( isArray ( source[key] ) || isPlainObject ( source[key] ) ) ) {\n\n        if ( !target[key] || target[key].constructor !== source[key].constructor ) target[key] = new source[key].constructor ();\n\n        extend ( deep, target[key], source[key] );\n\n      } else {\n\n        target[key] = source[key];\n\n      }\n\n    }\n\n  }\n\n  return target;\n\n}\n\ncash.extend = extend;\n\nfn.extend = function ( plugins: Record<string, any> ) {\n\n  return extend ( fn, plugins );\n\n};\n"
  },
  {
    "path": "src/core/filtered.ts",
    "content": "\n// @require collection/filter.ts\n\nfunction filtered ( collection: Cash, comparator?: Comparator ): Cash {\n\n  return !comparator ? collection : collection.filter ( comparator );\n\n}\n"
  },
  {
    "path": "src/core/find.ts",
    "content": "\n// @require ./variables.ts\n\nfunction find ( selector: string, context: Ele ): ArrayLike<Element> {\n\n  const isFragment = isDocumentFragment ( context );\n\n  return !selector || ( !isFragment && !isDocument ( context ) && !isElement ( context ) )\n           ? []\n           : !isFragment && classRe.test ( selector )\n             ? context.getElementsByClassName ( selector.slice ( 1 ).replace ( /\\\\/g, '' ) )\n             : !isFragment && tagRe.test ( selector )\n               ? context.getElementsByTagName ( selector )\n               : context.querySelectorAll ( selector );\n\n}\n"
  },
  {
    "path": "src/core/get_compare_function.ts",
    "content": "\n// @require ./matches.ts\n// @require ./type_checking.ts\n\nfunction getCompareFunction ( comparator?: Comparator ): (( i: number, ele: EleLoose ) => boolean) {\n\n  return isString ( comparator )\n           ? ( i: number, ele: EleLoose ) => matches ( ele, comparator )\n           : isFunction ( comparator )\n             ? comparator\n             : isCash ( comparator )\n               ? ( i: number, ele: EleLoose ) => comparator.is ( ele )\n               : !comparator\n                 ? () => false\n                 : ( i: number, ele: EleLoose ) => ele === comparator;\n\n}\n"
  },
  {
    "path": "src/core/get_split_values.ts",
    "content": "\n// @require ./type_checking.ts\n\nconst splitValuesRe = /\\S+/g;\n\nfunction getSplitValues ( str: string ) {\n\n  return isString ( str ) ? str.match ( splitValuesRe ) || [] : [];\n\n}\n"
  },
  {
    "path": "src/core/guid.ts",
    "content": "\n// @require ./cash.ts\n\ninterface CashStatic {\n  guid: number;\n}\n\ncash.guid = 1;\n"
  },
  {
    "path": "src/core/matches.ts",
    "content": "\n// @require ./cash.ts\n\nfunction matches ( ele: any, selector: string ): boolean {\n\n  const matches = ele && ( ele['matches'] || ele['webkitMatchesSelector'] || ele['msMatchesSelector'] );\n\n  return !!matches && !!selector && matches.call ( ele, selector );\n\n}\n"
  },
  {
    "path": "src/core/parse_html.ts",
    "content": "\n// @require ./cash.ts\n// @require ./variables.ts\n// @require ./type_checking.ts\n// @require collection/get.ts\n// @require manipulation/detach.ts\n\ninterface CashStatic {\n  parseHTML ( html: string ): EleLoose[];\n}\n\nconst fragmentRe = /^\\s*<(\\w+)[^>]*>/;\nconst singleTagRe = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/;\n\nconst containers = {\n  '*': div,\n  tr: tbody,\n  td: tr,\n  th: tr,\n  thead: table,\n  tbody: table,\n  tfoot: table\n};\n\n//TODO: Create elements inside a document fragment, in order to prevent inline event handlers from firing\n//TODO: Ensure the created elements have the fragment as their parent instead of null, this also ensures we can deal with detatched nodes more reliably\n\nfunction parseHTML ( html: string ): EleLoose[] {\n\n  if ( !isString ( html ) ) return [];\n\n  if ( singleTagRe.test ( html ) ) return [createElement ( RegExp.$1 )];\n\n  const fragment = fragmentRe.test ( html ) && RegExp.$1;\n  const container = containers[fragment] || containers['*'];\n\n  container.innerHTML = html;\n\n  return cash ( container.childNodes ).detach ().get ();\n\n}\n\ncash.parseHTML = parseHTML;\n"
  },
  {
    "path": "src/core/pluck.ts",
    "content": "\n// @require ./get_compare_function.ts\n// @require ./type_checking.ts\n// @require ./variables.ts\n\ntype PluckCallback<T> = ( ele: T ) => ArrayLike<Ele>;\n\nfunction pluck<T, U extends ArrayLike<T> = ArrayLike<T>> ( arr: U, prop: string | PluckCallback<U[0]>, deep?: boolean, until?: Comparator ): Array<Ele> {\n\n  const plucked: Array<Ele> = [];\n  const isCallback = isFunction ( prop );\n  const compare = until && getCompareFunction ( until );\n\n  for ( let i = 0, l = arr.length; i < l; i++ ) {\n\n    if ( isCallback ) {\n\n      const val = prop ( arr[i] );\n\n      if ( val.length ) push.apply ( plucked, val );\n\n    } else {\n\n      let val = arr[i][prop];\n\n      while ( val != null ) {\n\n        if ( until && compare ( -1, val ) ) break;\n\n        plucked.push ( val );\n\n        val = deep ? val[prop] : null;\n\n      }\n\n    }\n\n  }\n\n  return plucked;\n\n}\n"
  },
  {
    "path": "src/core/type_checking.ts",
    "content": "\n// @require ./cash.ts\n// @require ./variables.ts\n\ninterface CashStatic {\n  isWindow ( x: unknown ): x is Window;\n  isFunction ( x: unknown ): x is Function;\n  isArray ( x: unknown ): x is Array<any>;\n  isNumeric ( x: unknown ): boolean;\n  isPlainObject ( x: unknown ): x is PlainObject<any>;\n}\n\nfunction isCash ( value: unknown ): value is Cash {\n\n  return value instanceof Cash;\n\n}\n\nfunction isWindow ( value: unknown ): value is Window {\n\n  return !!value && value === value.window;\n\n}\n\nfunction isDocument ( value: unknown ): value is Document {\n\n  return !!value && value.nodeType === 9;\n\n}\n\nfunction isDocumentFragment ( value: unknown ): value is DocumentFragment {\n\n  return !!value && value.nodeType === 11;\n\n}\n\nfunction isElement ( value: unknown ): value is HTMLElement {\n\n  return !!value && value.nodeType === 1;\n\n}\n\nfunction isText ( value: unknown ): value is Text {\n\n  return !!value && value.nodeType === 3;\n\n}\n\nfunction isBoolean ( value: unknown ): value is boolean {\n\n  return typeof value === 'boolean';\n\n}\n\nfunction isFunction ( value: unknown ): value is Function {\n\n  return typeof value === 'function';\n\n}\n\nfunction isString ( value: unknown ): value is string {\n\n  return typeof value === 'string';\n\n}\n\nfunction isUndefined ( value: unknown ): value is undefined {\n\n  return value === undefined;\n\n}\n\nfunction isNull ( value: unknown ): value is null {\n\n  return value === null;\n\n}\n\nfunction isNumeric ( value: unknown ): boolean {\n\n  return !isNaN ( parseFloat ( value ) ) && isFinite ( value );\n\n}\n\nfunction isPlainObject ( value: unknown ): value is PlainObject<any> {\n\n  if ( typeof value !== 'object' || value === null ) return false;\n\n  const proto = Object.getPrototypeOf ( value );\n\n  return proto === null || proto === Object.prototype;\n\n}\n\ncash.isWindow = isWindow;\ncash.isFunction = isFunction;\ncash.isArray = isArray;\ncash.isNumeric = isNumeric;\ncash.isPlainObject = isPlainObject;\n"
  },
  {
    "path": "src/core/types.ts",
    "content": "\ninterface Event {\n  namespace: string,\n  data: any,\n  relatedTarget?: Node | null,\n  ___ifocus?: boolean, // Ignore focus\n  ___iblur?: boolean, // Ignore blur\n  ___ot?: string, // Original type\n  ___td?: boolean // Trigger data\n}\n\ninterface Cash {\n  [Symbol.iterator](): IterableIterator<EleLoose>,\n  [index: number]: EleLoose | undefined,\n  length: number,\n  splice ( start: number, deleteCount?: number ): EleLoose[],\n  splice ( start: number, deleteCount: number, ...items: Ele[] ): EleLoose[]\n}\n\ninterface CashStatic {\n  fn: Cash\n}\n\ntype falsy = undefined | null | false | 0 | '';\n\ntype Ele = Window | Document | HTMLElement | Element | Node;\ntype EleLoose = HTMLElement & Element & Node; //UGLY: Trick to remove some kind-of useless type errors //URL: https://github.com/fabiospampinato/cash/issues/278\ntype Selector = falsy | string | Function | HTMLCollection | NodeList | Ele | Ele[] | ArrayLike<Ele> | Cash;\ntype Comparator = string | Ele | Cash | (( this: EleLoose, index: number, ele: EleLoose ) => boolean);\ntype Context = Document | HTMLElement | Element | string;\n\ntype PlainObject<T> = Record<string, T>; //FIXME: Arrays can be assigned to this type, for whatever reason\n\ntype EventCallback = {\n  ( event: any, data?: any ): any,\n  guid?: number\n};\n"
  },
  {
    "path": "src/core/unique.ts",
    "content": "\n// @require ./cash.ts\n// @require ./variables.ts\n\ninterface CashStatic {\n  unique<T> ( arr: ArrayLike<T> ): ArrayLike<T>;\n}\n\nfunction unique<T> ( arr: ArrayLike<T> ): ArrayLike<T> {\n\n  return arr.length > 1 ? filter.call ( arr, ( item: T, index: number, self: ArrayLike<T> ) => indexOf.call ( self, item ) === index ) : arr;\n\n}\n\ncash.unique = unique;\n"
  },
  {
    "path": "src/core/variables.ts",
    "content": "\nconst doc = document;\nconst win = window;\nconst docEle = doc.documentElement;\nconst createElement = doc.createElement.bind ( doc );\nconst div = createElement ( 'div' );\nconst table = createElement ( 'table' );\nconst tbody = createElement ( 'tbody' );\nconst tr = createElement ( 'tr' );\nconst {isArray, prototype: ArrayPrototype} = Array;\nconst {concat, filter, indexOf, map, push, slice, some, splice} = ArrayPrototype;\n\nconst idRe = /^#(?:[\\w-]|\\\\.|[^\\x00-\\xa0])*$/;\nconst classRe = /^\\.(?:[\\w-]|\\\\.|[^\\x00-\\xa0])*$/;\nconst htmlRe = /<.+>/;\nconst tagRe = /^\\w+$/;\n"
  },
  {
    "path": "src/css/css.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./helpers/compute_style.ts\n// @require ./helpers/get_prefixed_prop.ts\n// @require ./helpers/get_suffixed_value.ts\n// @require ./helpers/is_css_variable.ts\n\ninterface Cash {\n  css ( prop: string ): string | undefined;\n  css ( prop: string, value: number | string ): this;\n  css ( props: Record<string, number | string> ): this;\n}\n\nfunction css ( this: Cash, prop: string ): string | undefined;\nfunction css ( this: Cash, prop: string, value: number | string ): Cash;\nfunction css ( this: Cash, prop: Record<string, number | string> ): Cash;\nfunction css ( this: Cash, prop: string | Record<string, number | string>, value?: number | string ) {\n\n  if ( isString ( prop ) ) {\n\n    const isVariable = isCSSVariable ( prop );\n\n    prop = getPrefixedProp ( prop, isVariable );\n\n    if ( arguments.length < 2 ) return this[0] && computeStyle ( this[0], prop, isVariable );\n\n    if ( !prop ) return this;\n\n    value = getSuffixedValue ( prop, value, isVariable );\n\n    return this.each ( ( i, ele ) => {\n\n      if ( !isElement ( ele ) ) return;\n\n      if ( isVariable ) {\n\n        ele.style.setProperty ( prop, value );\n\n      } else {\n\n        ele.style[prop] = value;\n\n      }\n\n    });\n\n  }\n\n  for ( const key in prop ) {\n\n    this.css ( key, prop[key] );\n\n  }\n\n  return this;\n\n};\n\nfn.css = css;\n"
  },
  {
    "path": "src/css/helpers/compute_style.ts",
    "content": "\n// @require core/type_checking.ts\n// @require core/variables.ts\n\nfunction computeStyle ( ele: EleLoose, prop: string, isVariable?: boolean ): string | undefined {\n\n  if ( !isElement ( ele ) ) return;\n\n  const style = win.getComputedStyle ( ele, null );\n\n  return isVariable ? style.getPropertyValue ( prop ) || undefined : style[prop] || ele.style[prop];\n\n}\n"
  },
  {
    "path": "src/css/helpers/compute_style_int.ts",
    "content": "\n// @require ./compute_style.ts\n\nfunction computeStyleInt ( ele: EleLoose, prop: string ): number {\n\n  return parseInt ( computeStyle ( ele, prop ), 10 ) || 0;\n\n}\n"
  },
  {
    "path": "src/css/helpers/get_prefixed_prop.ts",
    "content": "\n// @require core/camel_case.ts\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/variables.ts\n// @require ./is_css_variable.ts\n\nconst prefixedProps: { [prop: string]: string } = {};\nconst {style} = div;\nconst vendorsPrefixes = ['webkit', 'moz', 'ms'];\n\nfunction getPrefixedProp ( prop: string, isVariable: boolean = isCSSVariable ( prop ) ): string {\n\n  if ( isVariable ) return prop;\n\n  if ( !prefixedProps[prop] ) {\n\n    const propCC = camelCase ( prop );\n    const propUC = `${propCC[0].toUpperCase ()}${propCC.slice ( 1 )}`;\n    const props = ( `${propCC} ${vendorsPrefixes.join ( `${propUC} ` )}${propUC}` ).split ( ' ' );\n\n    each ( props, ( i, p ) => {\n\n      if ( p in style ) {\n\n        prefixedProps[prop] = p;\n\n        return false;\n\n      }\n\n    });\n\n  }\n\n  return prefixedProps[prop];\n\n}\n"
  },
  {
    "path": "src/css/helpers/get_suffixed_value.ts",
    "content": "\n// @require core/type_checking.ts\n// @require ./is_css_variable.ts\n\nconst numericProps: { [prop: string]: true | undefined } = {\n  animationIterationCount: true,\n  columnCount: true,\n  flexGrow: true,\n  flexShrink: true,\n  fontWeight: true,\n  gridArea: true,\n  gridColumn: true,\n  gridColumnEnd: true,\n  gridColumnStart: true,\n  gridRow: true,\n  gridRowEnd: true,\n  gridRowStart: true,\n  lineHeight: true,\n  opacity: true,\n  order: true,\n  orphans: true,\n  widows: true,\n  zIndex: true\n};\n\nfunction getSuffixedValue ( prop: string, value: number | string, isVariable: boolean = isCSSVariable ( prop ) ): string {\n\n  return !isVariable && !numericProps[prop] && isNumeric ( value ) ? `${value}px` : value;\n\n}\n"
  },
  {
    "path": "src/css/helpers/is_css_variable.ts",
    "content": "\n// @require ./variables.ts\n\nfunction isCSSVariable ( prop: string ): boolean {\n\n  return cssVariableRe.test ( prop );\n\n}\n"
  },
  {
    "path": "src/css/helpers/variables.ts",
    "content": "\nconst cssVariableRe = /^--/;\n"
  },
  {
    "path": "src/data/data.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./helpers/get_data.ts\n// @require ./helpers/set_data.ts\n\ninterface Cash {\n  data (): Record<string, any> | undefined;\n  data ( name: string ): any;\n  data ( name: string, value: any ): this;\n  data ( datas: Record<string, any> ): this;\n}\n\nfunction data ( this: Cash ): Record<string, any> | undefined;\nfunction data ( this: Cash, name: string ): any;\nfunction data ( this: Cash, name: string, value: any ): Cash;\nfunction data ( this: Cash, name: Record<string, any> ): Cash;\nfunction data ( this: Cash, name?: string | Record<string, any>, value?: any ) {\n\n  if ( !name ) {\n\n    if ( !this[0] ) return;\n\n    const datas: { [data: string]: any } = {};\n\n    for ( const key in this[0].dataset ) {\n\n      datas[key] = getData ( this[0], key );\n\n    }\n\n    return datas;\n\n  }\n\n  if ( isString ( name ) ) {\n\n    if ( arguments.length < 2 ) return this[0] && getData ( this[0], name );\n\n    if ( isUndefined ( value ) ) return this;\n\n    return this.each ( ( i, ele ) => { setData ( ele, name, value ) } );\n\n  }\n\n  for ( const key in name ) {\n\n    this.data ( key, name[key] );\n\n  }\n\n  return this;\n\n}\n\nfn.data = data;\n"
  },
  {
    "path": "src/data/helpers/get_data.ts",
    "content": "\n// @require core/attempt.ts\n// @require core/camel_case.ts\n\nconst JSONStringRe = /^\\s+|\\s+$/;\n\nfunction getData ( ele: EleLoose, key: string ): any {\n\n  const value = ele.dataset[key] || ele.dataset[camelCase ( key )];\n\n  if ( JSONStringRe.test ( value ) ) return value;\n\n  return attempt ( JSON.parse, value );\n\n}\n"
  },
  {
    "path": "src/data/helpers/set_data.ts",
    "content": "\n// @require core/attempt.ts\n// @require core/camel_case.ts\n\nfunction setData ( ele: EleLoose, key: string, value: any ): void {\n\n  value = attempt ( JSON.stringify, value );\n\n  ele.dataset[camelCase ( key )] = value;\n\n}\n"
  },
  {
    "path": "src/dimensions/helpers/get_document_dimension.ts",
    "content": "\nfunction getDocumentDimension ( doc: Document, dimension: 'Width' | 'Height' ): number {\n\n  const docEle = doc.documentElement;\n\n  return Math.max (\n    doc.body[`scroll${dimension}`],\n    docEle[`scroll${dimension}`],\n    doc.body[`offset${dimension}`],\n    docEle[`offset${dimension}`],\n    docEle[`client${dimension}`]\n  );\n\n}\n"
  },
  {
    "path": "src/dimensions/helpers/get_extra_space.ts",
    "content": "\n// @require css/helpers/compute_style_int.ts\n\nfunction getExtraSpace ( ele: EleLoose, xAxis?: boolean ): number {\n\n  return computeStyleInt ( ele, `border${ xAxis ? 'Left' : 'Top' }Width` ) + computeStyleInt ( ele, `padding${ xAxis ? 'Left' : 'Top' }` ) + computeStyleInt ( ele, `padding${ xAxis ? 'Right' : 'Bottom' }` ) + computeStyleInt ( ele, `border${ xAxis ? 'Right' : 'Bottom' }Width` );\n\n}\n"
  },
  {
    "path": "src/dimensions/inner_outer.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require ./helpers/get_document_dimension.ts\n\ninterface Cash {\n  innerWidth (): number | undefined;\n  innerHeight (): number | undefined;\n  outerWidth ( includeMargins?: boolean ): number;\n  outerHeight ( includeMargins?: boolean ): number;\n}\n\neach ( [true, false], ( i, outer?: boolean ) => {\n\n  each ( ['Width', 'Height'], ( i, prop: 'Width' | 'Height' ) => {\n\n    const name: 'outerWidth' | 'innerHeight' = `${outer ? 'outer' : 'inner'}${prop}`;\n\n    fn[name] = function ( this: Cash, includeMargins?: boolean ) {\n\n      if ( !this[0] ) return;\n\n      if ( isWindow ( this[0] ) ) return outer ? this[0][`inner${prop}`] : this[0].document.documentElement[`client${prop}`];\n\n      if ( isDocument ( this[0] ) ) return getDocumentDimension ( this[0], prop );\n\n      return this[0][`${outer ? 'offset' : 'client'}${prop}`] + ( includeMargins && outer ? computeStyleInt ( this[0], `margin${ i ? 'Top' : 'Left' }` ) + computeStyleInt ( this[0], `margin${ i ? 'Bottom' : 'Right' }` ) : 0 );\n\n    };\n\n  });\n\n});\n"
  },
  {
    "path": "src/dimensions/normal.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require css/helpers/compute_style.ts\n// @require css/helpers/get_suffixed_value.ts\n// @require ./helpers/get_extra_space.ts\n// @require ./helpers/get_document_dimension.ts\n\ninterface Cash {\n  width (): number;\n  width ( value: number | string ): this;\n  height (): number;\n  height ( value: number | string ): this;\n}\n\neach ( ['Width', 'Height'], ( index: number, prop: 'Width' | 'Height' ) => {\n\n  const propLC = prop.toLowerCase ();\n\n  fn[propLC] = function ( this: Cash, value?: number | string ) {\n\n    if ( !this[0] ) return isUndefined ( value ) ? undefined : this;\n\n    if ( !arguments.length ) {\n\n      if ( isWindow ( this[0] ) ) return this[0].document.documentElement[`client${prop}`];\n\n      if ( isDocument ( this[0] ) ) return getDocumentDimension ( this[0], prop );\n\n      return this[0].getBoundingClientRect ()[propLC] - getExtraSpace ( this[0], !index );\n\n    }\n\n    const valueNumber = parseInt ( value, 10 );\n\n    return this.each ( ( i, ele ) => {\n\n      if ( !isElement ( ele ) ) return;\n\n      const boxSizing = computeStyle ( ele, 'boxSizing' );\n\n      ele.style[propLC] = getSuffixedValue ( propLC, valueNumber + ( boxSizing === 'border-box' ? getExtraSpace ( ele, !index ) : 0 ) );\n\n    });\n\n  };\n\n});\n"
  },
  {
    "path": "src/effects/helpers/get_default_display.ts",
    "content": "\n// @require css/helpers/compute_style.ts\n\nconst defaultDisplay: { [tagName: string]: string } = {};\n\nfunction getDefaultDisplay ( tagName: string ): string {\n\n  if ( defaultDisplay[tagName] ) return defaultDisplay[tagName];\n\n  const ele = createElement ( tagName );\n\n  doc.body.insertBefore ( ele, null );\n\n  const display = computeStyle ( ele, 'display' );\n\n  doc.body.removeChild ( ele );\n\n  return defaultDisplay[tagName] = display !== 'none' ? display : 'block';\n\n}\n"
  },
  {
    "path": "src/effects/helpers/is_hidden.ts",
    "content": "\n// @require css/helpers/compute_style.ts\n\nfunction isHidden ( ele: EleLoose ): boolean {\n\n  return computeStyle ( ele, 'display' ) === 'none';\n\n}\n"
  },
  {
    "path": "src/effects/helpers/variables.ts",
    "content": "\nconst displayProperty = '___cd';\n"
  },
  {
    "path": "src/effects/hide.ts",
    "content": "\n// @require core/cash.ts\n// @require ./toggle.ts\n\ninterface Cash {\n  hide (): this;\n}\n\nfn.hide = function ( this: Cash ) {\n\n  return this.toggle ( false );\n\n};\n"
  },
  {
    "path": "src/effects/show.ts",
    "content": "\n// @require core/cash.ts\n// @require ./toggle.ts\n\ninterface Cash {\n  show (): this;\n}\n\nfn.show = function ( this: Cash ) {\n\n  return this.toggle ( true );\n\n};\n"
  },
  {
    "path": "src/effects/toggle.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require css/helpers/compute_style.ts\n// @require ./helpers/get_default_display.ts\n// @require ./helpers/is_hidden.ts\n// @require ./helpers/variables.ts\n\ninterface Cash {\n  toggle ( force?: boolean ): this;\n}\n\nfn.toggle = function ( this: Cash, force?: boolean ) {\n\n  return this.each ( ( i, ele ) => {\n\n    if ( !isElement ( ele ) ) return;\n\n    const hidden = isHidden ( ele );\n    const show = isUndefined ( force ) ? hidden : force;\n\n    if ( show ) {\n\n      ele.style.display = ele[displayProperty] || '';\n\n      if ( isHidden ( ele ) ) {\n\n        ele.style.display = getDefaultDisplay ( ele.tagName );\n\n      }\n\n    } else if ( !hidden ) {\n\n      ele[displayProperty] = computeStyle ( ele, 'display' );\n\n      ele.style.display = 'none';\n\n    }\n\n  });\n\n};\n"
  },
  {
    "path": "src/events/helpers/add_event.ts",
    "content": "\n// @require core/guid.ts\n// @require events/helpers/get_events_cache.ts\n\nfunction addEvent ( ele: EleLoose, name: string, namespaces: string[], selector: string, callback: EventCallback ): void {\n\n  const eventCache = getEventsCache ( ele );\n\n  eventCache[name] = ( eventCache[name] || [] );\n  eventCache[name].push ([ namespaces, selector, callback ]);\n\n  ele.addEventListener ( name, callback );\n\n}\n"
  },
  {
    "path": "src/events/helpers/get_event_name_bubbling.ts",
    "content": "\n// @require ./variables.ts\n\nfunction getEventNameBubbling ( name: string ): string {\n\n  return eventsHover[name] || eventsFocus[name] || name;\n\n}\n"
  },
  {
    "path": "src/events/helpers/get_events_cache.ts",
    "content": "\n// @require ./variables.ts\n\nfunction getEventsCache ( ele: EleLoose ): { [event: string]: [string[], string, EventCallback][] } {\n\n  return ele[eventsNamespace] = ( ele[eventsNamespace] || {} );\n\n}\n"
  },
  {
    "path": "src/events/helpers/has_namespaces.ts",
    "content": "\nfunction hasNamespaces ( ns1: string[], ns2?: string[] ): boolean {\n\n  return !ns2 || !some.call ( ns2, ( ns: string ) => ns1.indexOf ( ns ) < 0 );\n\n}\n"
  },
  {
    "path": "src/events/helpers/parse_event_name.ts",
    "content": "\n// @require ./variables.ts\n\nfunction parseEventName ( eventName: string ): [string, string[]] {\n\n  const parts = eventName.split ( eventsNamespacesSeparator );\n\n  return [parts[0], parts.slice ( 1 ).sort ()]; // [name, namespace[]]\n\n}\n"
  },
  {
    "path": "src/events/helpers/remove_event.ts",
    "content": "\n// @require ./get_events_cache.ts\n// @require ./has_namespaces.ts\n// @require ./parse_event_name.ts\n\nfunction removeEvent ( ele: EleLoose, name?: string, namespaces?: string[], selector?: string, callback?: EventCallback ): void {\n\n  const cache = getEventsCache ( ele );\n\n  if ( !name ) {\n\n    for ( name in cache ) {\n\n      removeEvent ( ele, name, namespaces, selector, callback );\n\n    }\n\n  } else if ( cache[name] ) {\n\n    cache[name] = cache[name].filter ( ([ ns, sel, cb ]) => {\n\n      if ( ( callback && cb.guid !== callback.guid ) || !hasNamespaces ( ns, namespaces ) || ( selector && selector !== sel ) ) return true;\n\n      ele.removeEventListener ( name, cb );\n\n    });\n\n  }\n\n}\n"
  },
  {
    "path": "src/events/helpers/variables.ts",
    "content": "\nconst eventsNamespace = '___ce';\nconst eventsNamespacesSeparator = '.';\nconst eventsFocus: { [event: string]: string | undefined } = { focus: 'focusin', blur: 'focusout' };\nconst eventsHover: { [event: string]: string | undefined } = { mouseenter: 'mouseover', mouseleave: 'mouseout' };\nconst eventsMouseRe = /^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;\n"
  },
  {
    "path": "src/events/off.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./helpers/get_event_name_bubbling.ts\n// @require ./helpers/parse_event_name.ts\n// @require ./helpers/remove_event.ts\n\ninterface Cash {\n  off (): this;\n  off ( events: string ): this;\n  off ( events: Record<string, EventCallback> ): this;\n  off ( events: string, callback: EventCallback ): this;\n  off ( events: string, selector: string, callback: EventCallback ): this;\n}\n\nfn.off = function ( this: Cash, eventFullName?: string | Record<string, EventCallback>, selector?: string | EventCallback, callback?: EventCallback ) {\n\n  if ( isUndefined ( eventFullName ) ) {\n\n    this.each ( ( i, ele ) => {\n\n      if ( !isElement ( ele ) && !isDocument ( ele ) && !isWindow ( ele ) ) return;\n\n      removeEvent ( ele );\n\n    });\n\n  } else if ( !isString ( eventFullName ) ) {\n\n    for ( const key in eventFullName ) {\n\n      this.off ( key, eventFullName[key] );\n\n    }\n\n  } else {\n\n    if ( isFunction ( selector ) ) {\n\n      callback = selector;\n      selector = '';\n\n    }\n\n    each ( getSplitValues ( eventFullName ), ( i, eventFullName ) => {\n\n      const [nameOriginal, namespaces] = parseEventName ( eventFullName );\n      const name = getEventNameBubbling ( nameOriginal );\n\n      this.each ( ( i, ele ) => {\n\n        if ( !isElement ( ele ) && !isDocument ( ele ) && !isWindow ( ele ) ) return;\n\n        removeEvent ( ele, name, namespaces, selector, callback );\n\n      });\n\n    });\n\n  }\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/events/on.ts",
    "content": "\n// @require core/cash.ts\n// @require core/get_split_values.ts\n// @require core/guid.ts\n// @require core/matches.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./helpers/variables.ts\n// @require ./helpers/add_event.ts\n// @require ./helpers/get_event_name_bubbling.ts\n// @require ./helpers/has_namespaces.ts\n// @require ./helpers/parse_event_name.ts\n// @require ./helpers/remove_event.ts\n\ninterface Cash {\n  on ( events: Record<string, EventCallback> ): this;\n  on ( events: Record<string, EventCallback>, selector: string ): this;\n  on ( events: Record<string, EventCallback>, data: any ): this;\n  on ( events: Record<string, EventCallback>, selector: string | null | undefined, data: any ): this;\n  on ( events: string, callback: EventCallback ): this;\n  on ( events: string, selector: string, callback: EventCallback ): this;\n  on ( events: string, data: any, callback: EventCallback ): this;\n  on ( events: string, selector: string | null | undefined, data: any, callback: EventCallback, _one?: boolean ): this;\n}\n\nfunction on ( this: Cash, eventFullName: Record<string, EventCallback> ): Cash;\nfunction on ( this: Cash, eventFullName: Record<string, EventCallback>, selector: string ): Cash;\nfunction on ( this: Cash, eventFullName: Record<string, EventCallback>, data: any ): Cash;\nfunction on ( this: Cash, eventFullName: Record<string, EventCallback>, selector: string | null | undefined, data: any ): Cash;\nfunction on ( this: Cash, eventFullName: string, callback: EventCallback ): Cash;\nfunction on ( this: Cash, eventFullName: string, selector: string, callback: EventCallback ): Cash;\nfunction on ( this: Cash, eventFullName: string, data: any, callback: EventCallback ): Cash;\nfunction on ( this: Cash, eventFullName: string, selector: string | null | undefined, data: any, callback: EventCallback, _one?: boolean ): Cash;\nfunction on ( this: Cash, eventFullName: Record<string, EventCallback> | string, selector?: any, data?: any, callback?: EventCallback, _one?: boolean ) {\n\n  if ( !isString ( eventFullName ) ) {\n\n    for ( const key in eventFullName ) {\n\n      this.on ( key, selector, data, eventFullName[key], _one );\n\n    }\n\n    return this;\n\n  }\n\n  if ( !isString ( selector ) ) {\n\n    if ( isUndefined ( selector ) || isNull ( selector ) ) {\n\n      selector = '';\n\n    } else if ( isUndefined ( data ) ) {\n\n      data = selector;\n      selector = '';\n\n    } else {\n\n      callback = data;\n      data = selector;\n      selector = '';\n\n    }\n\n  }\n\n  if ( !isFunction ( callback ) ) {\n\n    callback = data;\n    data = undefined;\n\n  }\n\n  if ( !callback ) return this;\n\n  each ( getSplitValues ( eventFullName ), ( i, eventFullName ) => {\n\n    const [nameOriginal, namespaces] = parseEventName ( eventFullName );\n    const name = getEventNameBubbling ( nameOriginal );\n    const isEventHover = ( nameOriginal in eventsHover );\n    const isEventFocus = ( nameOriginal in eventsFocus );\n\n    if ( !name ) return;\n\n    this.each ( ( i, ele ) => {\n\n      if ( !isElement ( ele ) && !isDocument ( ele ) && !isWindow ( ele ) ) return;\n\n      const finalCallback = function ( event: Event ) {\n\n        if ( event.target[`___i${event.type}`] ) return event.stopImmediatePropagation (); // Ignoring native event in favor of the upcoming custom one\n\n        if ( event.namespace && !hasNamespaces ( namespaces, event.namespace.split ( eventsNamespacesSeparator ) ) ) return;\n\n        if ( !selector && ( ( isEventFocus && ( event.target !== ele || event.___ot === name ) ) || ( isEventHover && event.relatedTarget && ele.contains ( event.relatedTarget ) ) ) ) return;\n\n        let thisArg: EventTarget = ele;\n\n        if ( selector ) {\n\n          let target = event.target;\n\n          while ( !matches ( target, selector ) ) {\n\n            if ( target === ele ) return;\n\n            target = target.parentNode;\n\n            if ( !target ) return;\n\n          }\n\n          thisArg = target;\n\n        }\n\n        Object.defineProperty ( event, 'currentTarget', {\n          configurable: true,\n          get () { // We need to define a getter for this to work everywhere\n            return thisArg;\n          }\n        });\n\n        Object.defineProperty ( event, 'delegateTarget', {\n          configurable: true,\n          get () { // We need to define a getter for this to work everywhere\n            return ele;\n          }\n        });\n\n        Object.defineProperty ( event, 'data', {\n          configurable: true,\n          get () {\n            return data;\n          }\n        });\n\n        const returnValue = callback.call ( thisArg, event, event.___td );\n\n        if ( _one ) {\n\n          removeEvent ( ele, name, namespaces, selector, finalCallback );\n\n        }\n\n        if ( returnValue === false ) {\n\n          event.preventDefault ();\n          event.stopPropagation ();\n\n        }\n\n      };\n\n      finalCallback.guid = callback.guid = ( callback.guid || cash.guid++ );\n\n      addEvent ( ele, name, namespaces, selector, finalCallback );\n\n    });\n\n  });\n\n  return this;\n\n}\n\nfn.on = on;\n"
  },
  {
    "path": "src/events/one.ts",
    "content": "\n// @require core/cash.ts\n// @require ./on.ts\n\ninterface Cash {\n  one ( events: Record<string, EventCallback> ): this;\n  one ( events: Record<string, EventCallback>, selector: string ): this;\n  one ( events: Record<string, EventCallback>, data: any ): this;\n  one ( events: Record<string, EventCallback>, selector: string | null | undefined, data: any ): this;\n  one ( events: string, callback: EventCallback ): this;\n  one ( events: string, selector: string, callback: EventCallback ): this;\n  one ( events: string, data: any, callback: EventCallback ): this;\n  one ( events: string, selector: string | null | undefined, data: any, callback: EventCallback ): this;\n}\n\nfunction one ( this: Cash, eventFullName: Record<string, EventCallback> ): Cash;\nfunction one ( this: Cash, eventFullName: Record<string, EventCallback>, selector: string ): Cash;\nfunction one ( this: Cash, eventFullName: Record<string, EventCallback>, data: any ): Cash;\nfunction one ( this: Cash, eventFullName: Record<string, EventCallback>, selector: string | null | undefined, data: any ): Cash;\nfunction one ( this: Cash, eventFullName: string, callback: EventCallback ): Cash;\nfunction one ( this: Cash, eventFullName: string, selector: string, callback: EventCallback ): Cash;\nfunction one ( this: Cash, eventFullName: string, data: any, callback: EventCallback ): Cash;\nfunction one ( this: Cash, eventFullName: string, selector: string | null | undefined, data: any, callback: EventCallback ): Cash;\nfunction one ( this: Cash, eventFullName: Record<string, EventCallback> | string, selector?: any, data?: any, callback?: EventCallback ) {\n\n  return this.on ( eventFullName, selector, data, callback, true );\n\n};\n\nfn.one = one;\n"
  },
  {
    "path": "src/events/ready.ts",
    "content": "\n// @require core/cash.ts\n// @require core/variables.ts\n\ninterface Cash {\n  ready ( callback: Function ): this;\n}\n\nfn.ready = function ( this: Cash, callback: ( $: typeof cash ) => any ) {\n\n  const cb = () => setTimeout ( callback, 0, cash );\n\n  if ( doc.readyState !== 'loading' ) {\n\n    cb ();\n\n  } else {\n\n    doc.addEventListener ( 'DOMContentLoaded', cb );\n\n  }\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/events/trigger.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require collection/each.ts\n// @require ./helpers/get_event_name_bubbling.ts\n// @require ./helpers/parse_event_name.ts\n// @require ./helpers/variables.ts\n\ninterface Cash {\n  trigger ( event: Event | string, data?: any ): this;\n}\n\nfn.trigger = function ( this: Cash, event: Event | string, data?: any ) {\n\n  if ( isString ( event ) ) {\n\n    const [nameOriginal, namespaces] = parseEventName ( event );\n    const name = getEventNameBubbling ( nameOriginal );\n\n    if ( !name ) return this;\n\n    const type = eventsMouseRe.test ( name ) ? 'MouseEvents' : 'HTMLEvents';\n\n    event = doc.createEvent ( type );\n    event.initEvent ( name, true, true );\n    event.namespace = namespaces.join ( eventsNamespacesSeparator );\n    event.___ot = nameOriginal;\n\n  }\n\n  event.___td = data;\n\n  const isEventFocus = ( event.___ot in eventsFocus );\n\n  return this.each ( ( i, ele ) => {\n\n    if ( isEventFocus && isFunction ( ele[event.___ot] ) ) {\n\n      ele[`___i${event.type}`] = true; // Ensuring the native event is ignored\n\n      ele[event.___ot]();\n\n      ele[`___i${event.type}`] = false; // Ensuring the custom event is not ignored\n\n    }\n\n    ele.dispatchEvent ( event );\n\n  });\n\n};\n"
  },
  {
    "path": "src/export_cjs.ts",
    "content": "\n// @require methods.ts\n\nif ( typeof exports !== 'undefined' ) { // Node.js\n\n  module.exports = cash;\n\n} else { // Browser\n\n  win['cash'] = win['$'] = cash;\n\n}\n"
  },
  {
    "path": "src/export_esm.ts",
    "content": "\n// @require methods.ts\n\nexport default cash;\nexport {Cash, CashStatic, Ele as Element, Selector, Comparator, Context};\n"
  },
  {
    "path": "src/extra/get_script.ts",
    "content": "\n// @require core/cash.ts\n// @require core/variables.ts\n\ninterface CashStatic {\n  getScript ( url: string, success?: Function ): void;\n}\n\ncash.getScript = function ( url: string, success?: Function ): void {\n\n  const script = createElement ( 'script' );\n  const $anchor = cash ( 'script' );\n\n  script.async = true;\n  script.src = url;\n\n  if ( success ) script.onload = () => { success () };\n\n  $anchor.before ( script );\n\n};\n"
  },
  {
    "path": "src/extra/shorthands.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require events/on.ts\n// @require events/trigger.ts\n\ntype shorthandEventName = 'blur' | 'focus' | 'focusin' | 'focusout' | 'resize' | 'scroll' | 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mousemove' | 'mouseover' | 'mouseout' | 'mouseenter' | 'mouseleave' | 'change' | 'select' | 'submit' | 'keydown' | 'keypress' | 'keyup' | 'contextmenu';\n\ninterface Cash {\n  blur ( handler?: Function ): Cash;\n  focus ( handler?: Function ): Cash;\n  focusin ( handler?: Function ): Cash;\n  focusout ( handler?: Function ): Cash;\n  resize ( handler?: Function ): Cash;\n  scroll ( handler?: Function ): Cash;\n  click ( handler?: Function ): Cash;\n  dblclick ( handler?: Function ): Cash;\n  mousedown ( handler?: Function ): Cash;\n  mouseup ( handler?: Function ): Cash;\n  mousemove ( handler?: Function ): Cash;\n  mouseover ( handler?: Function ): Cash;\n  mouseout ( handler?: Function ): Cash;\n  mouseenter ( handler?: Function ): Cash;\n  mouseleave ( handler?: Function ): Cash;\n  change ( handler?: Function ): Cash;\n  select ( handler?: Function ): Cash;\n  submit ( handler?: Function ): Cash;\n  keydown ( handler?: Function ): Cash;\n  keypress ( handler?: Function ): Cash;\n  keyup ( handler?: Function ): Cash;\n  contextmenu ( handler?: Function ): Cash;\n}\n\ncash.each ( 'blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu'.split ( ' ' ), ( i, event: shorthandEventName ) => {\n\n  cash.fn[event] = function ( this: Cash, callback?: EventCallback ) {\n\n    if ( callback ) return this.on ( event, callback );\n\n    return this.trigger ( event );\n\n  };\n\n});\n"
  },
  {
    "path": "src/forms/helpers/get_value.ts",
    "content": "\n// @require core/pluck.ts\n// @require core/variables.ts\n\nfunction getValue ( ele: EleLoose ): string | string[] {\n\n  if ( ele.multiple && ele.options ) return pluck ( filter.call ( ele.options, option => option.selected && !option.disabled && !option.parentNode.disabled ), 'value' );\n\n  return ele.value || '';\n\n}\n"
  },
  {
    "path": "src/forms/helpers/query_encode.ts",
    "content": "\nconst queryEncodeCRLFRe = /\\r?\\n/g;\n\nfunction queryEncode ( prop: string, value: string ): string {\n\n  return `&${encodeURIComponent ( prop )}=${encodeURIComponent ( value.replace ( queryEncodeCRLFRe, '\\r\\n' ) )}`;\n\n}\n"
  },
  {
    "path": "src/forms/serialize.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/type_checking.ts\n// @require ./helpers/get_value.ts\n// @require ./helpers/query_encode.ts\n\ninterface Cash {\n  serialize (): string;\n}\n\nconst skippableRe = /file|reset|submit|button|image/i;\nconst checkableRe = /radio|checkbox/i;\n\nfn.serialize = function ( this: Cash ) {\n\n  let query = '';\n\n  this.each ( ( i, ele ) => {\n\n    each ( ele.elements || [ele], ( i, ele: EleLoose ) => {\n\n      if ( ele.disabled || !ele.name || ele.tagName === 'FIELDSET' || skippableRe.test ( ele.type ) || ( checkableRe.test ( ele.type ) && !ele.checked ) ) return;\n\n      const value = getValue ( ele );\n\n      if ( !isUndefined ( value ) ) {\n\n        const values = isArray ( value ) ? value : [value];\n\n        each ( values, ( i, value ) => {\n\n          query += queryEncode ( ele.name, value );\n\n        });\n\n      }\n\n    });\n\n  });\n\n  return query.slice ( 1 );\n\n};\n"
  },
  {
    "path": "src/forms/val.ts",
    "content": "\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require ./helpers/get_value.ts\n\ninterface Cash {\n  val (): string | string[];\n  val ( value: string | string[] ): this;\n}\n\nfunction val ( this: Cash ): string | string[];\nfunction val ( this: Cash, value: string | string[] ): Cash;\nfunction val ( this: Cash, value?: string | string[] ) {\n\n  if ( !arguments.length ) return this[0] && getValue ( this[0] );\n\n  return this.each ( ( i, ele ) => {\n\n    const isSelect = ele.multiple && ele.options;\n\n    if ( isSelect || checkableRe.test ( ele.type ) ) {\n\n      const eleValue = isArray ( value ) ? map.call ( value, String ) : ( isNull ( value ) ? [] : [String ( value )] );\n\n      if ( isSelect ) {\n\n        each ( ele.options, ( i, option ) => {\n\n          option.selected = eleValue.indexOf ( option.value ) >= 0;\n\n        }, true );\n\n      } else {\n\n        ele.checked = eleValue.indexOf ( ele.value ) >= 0;\n\n      }\n\n    } else {\n\n      ele.value = isUndefined ( value ) || isNull ( value ) ? '' : value;\n\n    }\n\n  });\n\n}\n\nfn.val = val;\n"
  },
  {
    "path": "src/manipulation/after.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  after ( ...selectors: Selector[] ): this;\n}\n\nfn.after = function ( this: Cash ) {\n\n  return insertSelectors ( arguments, this, false, false, false, true, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/append.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  append ( ...selectors: Selector[] ): this;\n}\n\nfn.append = function ( this: Cash ) {\n\n  return insertSelectors ( arguments, this, false, false, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/append_to.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  appendTo ( selector: Selector ): this;\n}\n\nfn.appendTo = function ( this: Cash, selector: Selector ) {\n\n  return insertSelectors ( arguments, this, true, false, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/before.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  before ( ...selectors: Selector[] ): this;\n}\n\nfn.before = function ( this: Cash ) {\n\n  return insertSelectors ( arguments, this, false, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/clone.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/map.ts\n\ninterface Cash {\n  clone (): this;\n}\n\nfn.clone = function ( this: Cash ) {\n\n  return this.map ( ( i, ele ) => ele.cloneNode ( true ) );\n\n};\n"
  },
  {
    "path": "src/manipulation/detach.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require collection/each.ts\n\ninterface Cash {\n  detach ( comparator?: Comparator ): this;\n}\n\nfn.detach = function ( this: Cash, comparator?: Comparator ) {\n\n  filtered ( this, comparator ).each ( ( i, ele ) => {\n\n    if ( ele.parentNode ) {\n\n      ele.parentNode.removeChild ( ele );\n\n    }\n\n  });\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/manipulation/empty.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/each.ts\n\ninterface Cash {\n  empty (): this;\n}\n\nfn.empty = function ( this: Cash ) {\n\n  return this.each ( ( i, ele ) => {\n\n    while ( ele.firstChild ) {\n\n      ele.removeChild ( ele.firstChild );\n\n    }\n\n  });\n\n};\n"
  },
  {
    "path": "src/manipulation/helpers/eval_scripts.ts",
    "content": "\n// @require core/variables.ts\n// @require collection/filter.ts\n// @require traversal/find.ts\n\nconst HTMLCDATARe = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\nconst scriptTypeRe = /^$|^module$|\\/(java|ecma)script/i;\nconst scriptAttributes: ('type' | 'src' | 'nonce' | 'noModule')[] = ['type', 'src', 'nonce', 'noModule'];\n\nfunction evalScripts ( node: Node, doc: Document ): void {\n\n  const collection = cash ( node );\n\n  collection.filter ( 'script' ).add ( collection.find ( 'script' ) ).each ( ( i, ele: HTMLScriptElement ) => {\n\n    if ( scriptTypeRe.test ( ele.type ) && docEle.contains ( ele ) ) { // The script type is supported // The element is attached to the DOM // Using `documentElement` for broader browser support\n\n      const script = createElement ( 'script' );\n\n      script.text = ele.textContent.replace ( HTMLCDATARe, '' );\n\n      each ( scriptAttributes, ( i, attr ) => {\n\n        if ( ele[attr] ) script[attr] = ele[attr];\n\n      });\n\n      doc.head.insertBefore ( script, null );\n      doc.head.removeChild ( script );\n\n    }\n\n  });\n\n}\n"
  },
  {
    "path": "src/manipulation/helpers/insert_element.ts",
    "content": "\n// @require ./eval_scripts.ts\n\nfunction insertElement ( anchor: EleLoose, target: EleLoose, left?: boolean, inside?: boolean, evaluate?: boolean ): void {\n\n  if ( inside ) { // prepend/append\n\n    anchor.insertBefore ( target, left ? anchor.firstChild : null );\n\n  } else { // before/after\n\n    if ( anchor.nodeName === 'HTML' ) {\n\n      anchor.parentNode.replaceChild ( target, anchor );\n\n    } else {\n\n      anchor.parentNode.insertBefore ( target, left ? anchor : anchor.nextSibling );\n\n    }\n\n  }\n\n  if ( evaluate ) {\n\n    evalScripts ( target, anchor.ownerDocument );\n\n  }\n\n}\n"
  },
  {
    "path": "src/manipulation/helpers/insert_selectors.ts",
    "content": "\n// @require ./insert_element.ts\n\nfunction insertSelectors<T extends ArrayLike<EleLoose> = ArrayLike<EleLoose>> ( selectors: ArrayLike<Selector>, anchors: T, inverse?: boolean, left?: boolean, inside?: boolean, reverseLoop1?: boolean, reverseLoop2?: boolean, reverseLoop3?: boolean ): T {\n\n  each ( selectors, ( si, selector: Selector ) => {\n\n    each ( cash ( selector ), ( ti, target ) => {\n\n      each ( cash ( anchors ), ( ai, anchor ) => {\n\n        const anchorFinal = inverse ? target : anchor;\n        const targetFinal = inverse ? anchor : target;\n        const indexFinal = inverse ? ti : ai;\n\n        insertElement ( anchorFinal, !indexFinal ? targetFinal : targetFinal.cloneNode ( true ), left, inside, !indexFinal );\n\n      }, reverseLoop3 );\n\n    }, reverseLoop2 );\n\n  }, reverseLoop1 );\n\n  return anchors;\n\n}\n"
  },
  {
    "path": "src/manipulation/html.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require manipulation/append.ts\n// @require manipulation/empty.ts\n\ninterface Cash {\n  html (): string;\n  html ( html: string ): this;\n}\n\nfunction html ( this: Cash ): string;\nfunction html ( this: Cash, html: string ): Cash;\nfunction html ( this: Cash, html?: string ) {\n\n  if ( !arguments.length ) return this[0] && this[0].innerHTML;\n\n  if ( isUndefined ( html ) ) return this;\n\n  const hasScript = /<script[\\s>]/.test ( html );\n\n  return this.each ( ( i, ele ) => {\n\n    if ( !isElement ( ele ) ) return;\n\n    if ( hasScript ) {\n\n      cash ( ele ).empty ().append ( html );\n\n    } else {\n\n      ele.innerHTML = html;\n\n    }\n\n  });\n\n}\n\nfn.html = html;\n"
  },
  {
    "path": "src/manipulation/insert_after.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  insertAfter ( selector: Selector ): this;\n}\n\nfn.insertAfter = function ( this: Cash, selector: Selector ) {\n\n  return insertSelectors ( arguments, this, true, false, false, false, false, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/insert_before.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  insertBefore ( selector: Selector ): this;\n}\n\nfn.insertBefore = function ( this: Cash, selector: Selector ) {\n\n  return insertSelectors ( arguments, this, true, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/prepend.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  prepend ( ...selectors: Selector[] ): this;\n}\n\nfn.prepend = function ( this: Cash ) {\n\n  return insertSelectors ( arguments, this, false, true, true, true, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/prepend_to.ts",
    "content": "\n// @require core/cash.ts\n// @require ./helpers/insert_selectors.ts\n\ninterface Cash {\n  prependTo ( selector: Selector ): this;\n}\n\nfn.prependTo = function ( this: Cash, selector: Selector ) {\n\n  return insertSelectors ( arguments, this, true, true, true, false, false, true );\n\n};\n"
  },
  {
    "path": "src/manipulation/remove.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require events/off.ts\n// @require ./detach.ts\n\ninterface Cash {\n  remove ( comparator?: Comparator ): this;\n}\n\nfn.remove = function ( this: Cash, comparator?: Comparator ) {\n\n  filtered ( this, comparator ).detach ().off ();\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/manipulation/replace_all.ts",
    "content": "\n// @require core/cash.ts\n// @require ./replace_with.ts\n\ninterface Cash {\n  replaceAll ( selector: Selector ): this;\n}\n\nfn.replaceAll = function ( this: Cash, selector: Selector ) {\n\n  cash ( selector ).replaceWith ( this );\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/manipulation/replace_with.ts",
    "content": "\n// @require core/cash.ts\n// @require ./before.ts\n// @require ./remove.ts\n\ninterface Cash {\n  replaceWith ( selector: Selector ): this;\n}\n\nfn.replaceWith = function ( this: Cash, selector: Selector ) {\n\n  return this.before ( selector ).remove ();\n\n};\n"
  },
  {
    "path": "src/manipulation/text.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require collection/each.ts\n// @require collection/get.ts\n\ninterface Cash {\n  text (): string;\n  text ( text: string ): this;\n}\n\nfunction text ( this: Cash ): string;\nfunction text ( this: Cash, text: string ): Cash;\nfunction text ( this: Cash, text?: string ) {\n\n  if ( isUndefined ( text ) ) {\n\n    return this.get ().map ( ele => isElement ( ele ) || isText ( ele ) ? ele.textContent : '' ).join ( '' );\n\n  }\n\n  return this.each ( ( i, ele ) => {\n\n    if ( !isElement ( ele ) ) return;\n\n    ele.textContent = text;\n\n  });\n\n}\n\nfn.text = text;\n"
  },
  {
    "path": "src/manipulation/unwrap.ts",
    "content": "\n// @require core/cash.ts\n\ninterface Cash {\n  unwrap (): this;\n}\n\nfn.unwrap = function ( this: Cash ) {\n\n  this.parent ().each ( ( i, ele ) => {\n\n    if ( ele.tagName === 'BODY' ) return;\n\n    const $ele = cash ( ele );\n\n    $ele.replaceWith ( $ele.children () );\n\n  });\n\n  return this;\n\n};\n"
  },
  {
    "path": "src/manipulation/wrap.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/each.ts\n// @require ./wrap_all.ts\n\ninterface Cash {\n  wrap ( selector?: Selector ): this;\n}\n\nfn.wrap = function ( this: Cash, selector?: Selector ) {\n\n  return this.each ( ( i, ele ) => {\n\n    const wrapper = cash ( selector )[0];\n\n    cash ( ele ).wrapAll ( !i ? wrapper : wrapper.cloneNode ( true ) );\n\n  });\n\n};\n"
  },
  {
    "path": "src/manipulation/wrap_all.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/first.ts\n// @require manipulation/append_to.ts\n// @require manipulation/before.ts\n\ninterface Cash {\n  wrapAll ( selector?: Selector ): this;\n}\n\nfn.wrapAll = function ( this: Cash, selector?: Selector ) {\n\n  let structure = cash ( selector );\n  let wrapper: Element = structure[0];\n\n  while ( wrapper.children.length ) wrapper = wrapper.firstElementChild;\n\n  this.first ().before ( structure );\n\n  return this.appendTo ( wrapper );\n\n};\n"
  },
  {
    "path": "src/manipulation/wrap_inner.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/first.ts\n// @require manipulation/append_to.ts\n\ninterface Cash {\n  wrapInner ( selector?: Selector ): this;\n}\n\nfn.wrapInner = function ( this: Cash, selector?: Selector ) {\n\n  return this.each ( ( i, ele ) => {\n\n    const $ele = cash ( ele );\n    const contents = $ele.contents ();\n\n    contents.length ? contents.wrapAll ( selector ) : $ele.append ( selector );\n\n  });\n\n};\n"
  },
  {
    "path": "src/methods.ts",
    "content": "\n// @require core/types.ts\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require core/each.ts\n// @require core/extend.ts\n// @require core/find.ts\n// @require core/get_compare_function.ts\n// @require core/get_split_values.ts\n// @require core/guid.ts\n// @require core/parse_html.ts\n// @require core/unique.ts\n\n// @require attributes/add_class.ts\n// @require attributes/attr.ts\n// @require attributes/has_class.ts\n// @require attributes/prop.ts\n// @require attributes/remove_attr.ts\n// @require attributes/remove_class.ts\n// @require attributes/remove_prop.ts\n// @require attributes/toggle_class.ts\n\n// @require collection/add.ts\n// @require collection/each.ts\n// @require collection/eq.ts\n// @require collection/filter.ts\n// @require collection/first.ts\n// @require collection/get.ts\n// @require collection/index.ts\n// @require collection/last.ts\n// @require collection/map.ts\n// @require collection/slice.ts\n\n// @require css/css.ts\n\n// @require data/data.ts\n\n// @require dimensions/inner_outer.ts\n// @require dimensions/normal.ts\n\n// @require effects/hide.ts\n// @require effects/show.ts\n// @require effects/toggle.ts\n\n// @require events/off.ts\n// @require events/on.ts\n// @require events/one.ts\n// @require events/ready.ts\n// @require events/trigger.ts\n\n// @require forms/serialize.ts\n// @require forms/val.ts\n\n// @require manipulation/after.ts\n// @require manipulation/append.ts\n// @require manipulation/append_to.ts\n// @require manipulation/before.ts\n// @require manipulation/clone.ts\n// @require manipulation/detach.ts\n// @require manipulation/empty.ts\n// @require manipulation/html.ts\n// @require manipulation/insert_after.ts\n// @require manipulation/insert_before.ts\n// @require manipulation/prepend.ts\n// @require manipulation/prepend_to.ts\n// @require manipulation/remove.ts\n// @require manipulation/replace_all.ts\n// @require manipulation/replace_with.ts\n// @require manipulation/text.ts\n// @require manipulation/unwrap.ts\n// @require manipulation/wrap.ts\n// @require manipulation/wrap_all.ts\n// @require manipulation/wrap_inner.ts\n\n// @require offset/offset.ts\n// @require offset/offset_parent.ts\n// @require offset/position.ts\n\n// @require traversal/children.ts\n// @require traversal/closest.ts\n// @require traversal/contents.ts\n// @require traversal/find.ts\n// @require traversal/has.ts\n// @require traversal/is.ts\n// @require traversal/next.ts\n// @require traversal/next_all.ts\n// @require traversal/next_until.ts\n// @require traversal/not.ts\n// @require traversal/parent.ts\n// @require traversal/parents.ts\n// @require traversal/parents_until.ts\n// @require traversal/prev.ts\n// @require traversal/prev_all.ts\n// @require traversal/prev_until.ts\n// @require traversal/siblings.ts\n\n// @no-require extras/get_script.ts\n// @no-require extras/shorthands.ts\n"
  },
  {
    "path": "src/offset/offset.ts",
    "content": "\n// @require core/cash.ts\n// @require core/variables.ts\n\ninterface Cash {\n  offset (): undefined | {\n    top: number,\n    left: number\n  };\n}\n\nfn.offset = function ( this: Cash ) {\n\n  const ele = this[0];\n\n  if ( !ele ) return;\n\n  const rect = ele.getBoundingClientRect ();\n\n  return {\n    top: rect.top + win.pageYOffset,\n    left: rect.left + win.pageXOffset\n  };\n\n};\n"
  },
  {
    "path": "src/offset/offset_parent.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/map.ts\n// @require css/helpers/compute_style.ts\n\ninterface Cash {\n  offsetParent (): Cash;\n}\n\nfn.offsetParent = function ( this: Cash ) {\n\n  return this.map ( ( i, ele ) => {\n\n    let offsetParent = ele.offsetParent;\n\n    while ( offsetParent && computeStyle ( offsetParent, 'position' ) === 'static' ) {\n\n      offsetParent = offsetParent.offsetParent;\n\n    }\n\n    return offsetParent || docEle;\n\n  });\n\n};\n"
  },
  {
    "path": "src/offset/position.ts",
    "content": "\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require css/helpers/compute_style.ts\n// @require css/helpers/compute_style_int.ts\n// @require ./offset.ts\n\ninterface Cash {\n  position (): undefined | {\n    top: number,\n    left: number\n  };\n}\n\nfn.position = function ( this: Cash ) {\n\n  const ele = this[0];\n\n  if ( !ele ) return;\n\n  const isFixed = ( computeStyle ( ele, 'position' ) === 'fixed' );\n  const offset = isFixed ? ele.getBoundingClientRect () : this.offset ();\n\n  if ( !isFixed ) {\n\n    const doc = ele.ownerDocument;\n\n    let offsetParent = ele.offsetParent || doc.documentElement;\n\n    while ( ( offsetParent === doc.body || offsetParent === doc.documentElement ) && computeStyle ( offsetParent, 'position' ) === 'static' ) {\n\n      offsetParent = offsetParent.parentNode;\n\n    }\n\n    if ( offsetParent !== ele && isElement ( offsetParent ) ) {\n\n      const parentOffset = cash ( offsetParent ).offset ();\n\n      offset.top -= parentOffset.top + computeStyleInt ( offsetParent, 'borderTopWidth' );\n      offset.left -= parentOffset.left + computeStyleInt ( offsetParent, 'borderLeftWidth' );\n\n    }\n\n  }\n\n  return {\n    top: offset.top - computeStyleInt ( ele, 'marginTop' ),\n    left: offset.left - computeStyleInt ( ele, 'marginLeft' )\n  };\n\n};\n"
  },
  {
    "path": "src/traversal/children.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n// @require core/variables.ts\n// @require collection/each.ts\n\ninterface Cash {\n  children ( comparator?: Comparator ): Cash;\n}\n\nfn.children = function ( this: Cash, comparator?: Comparator ) {\n\n  return filtered ( cash ( unique ( pluck ( this, ele => ele.children ) ) ), comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/closest.ts",
    "content": "\n// @require core/cash.ts\n// @require collection/filter.ts\n// @require ./is.ts\n// @require ./parent.ts\n\ninterface Cash {\n  closest ( comparator?: Comparator ): Cash;\n}\n\nfn.closest = function ( this: Cash, comparator?: Comparator ) {\n\n  const filtered = this.filter ( comparator );\n\n  if ( filtered.length ) return filtered;\n\n  const $parent = this.parent ();\n\n  if ( !$parent.length ) return filtered;\n\n  return $parent.closest ( comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/contents.ts",
    "content": "\n// @require core/cash.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n// @require collection/each.ts\n\ninterface Cash {\n  contents (): Cash;\n}\n\nfn.contents = function ( this: Cash ) {\n\n  return cash ( unique ( pluck ( this, ele => ele.tagName === 'IFRAME' ? [ele.contentDocument] : ( ele.tagName === 'TEMPLATE' ? ele.content.childNodes : ele.childNodes ) ) ) );\n\n};\n"
  },
  {
    "path": "src/traversal/find.ts",
    "content": "\n// @require core/cash.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n// @require core/find.ts\n// @require core/variables.ts\n\ninterface Cash {\n  find ( selector: string ): Cash;\n}\n\nfn.find = function ( this: Cash, selector: string ) {\n\n  return cash ( unique ( pluck ( this, ele => find ( selector, ele ) ) ) );\n\n};\n"
  },
  {
    "path": "src/traversal/has.ts",
    "content": "\n// @require core/cash.ts\n// @require core/find.ts\n// @require core/type_checking.ts\n// @require collection/filter.ts\n\ninterface Cash {\n  has ( selector: string | Node ): Cash;\n}\n\nfn.has = function ( this: Cash, selector: string | Node ) {\n\n  const comparator = isString ( selector )\n                       ? ( i: number, ele: EleLoose ) => find ( selector, ele ).length\n                       : ( i: number, ele: EleLoose ) => ele.contains ( selector );\n\n  return this.filter ( comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/is.ts",
    "content": "\n// @require core/cash.ts\n// @require core/get_compare_function.ts\n// @require core/variables.ts\n// @require collection/each.ts\n\ninterface Cash {\n  is ( comparator?: Comparator ): boolean;\n}\n\nfn.is = function ( this: Cash, comparator?: Comparator ) {\n\n  const compare = getCompareFunction ( comparator );\n\n  return some.call ( this, ( ele: EleLoose, i: number ) => compare.call ( ele, i, ele ) );\n\n};\n"
  },
  {
    "path": "src/traversal/next.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n\ninterface Cash {\n  next ( comparator?: Comparator, _all?: boolean, _until?: Comparator ): Cash;\n}\n\nfn.next = function ( this: Cash, comparator?: Comparator, _all?: boolean, _until?: Comparator ) {\n\n  return filtered ( cash ( unique ( pluck ( this, 'nextElementSibling', _all, _until ) ) ), comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/next_all.ts",
    "content": "\n// @require ./next.ts\n\ninterface Cash {\n  nextAll ( comparator?: Comparator): Cash;\n}\n\nfn.nextAll = function ( this: Cash, comparator?: Comparator ) {\n\n  return this.next ( comparator, true );\n\n};\n"
  },
  {
    "path": "src/traversal/next_until.ts",
    "content": "\n// @require ./next.ts\n\ninterface Cash {\n  nextUntil ( until?: Comparator, comparator?: Comparator): Cash;\n}\n\nfn.nextUntil = function ( this: Cash, until?: Comparator, comparator?: Comparator ) {\n\n  return this.next ( comparator, true, until );\n\n};\n"
  },
  {
    "path": "src/traversal/not.ts",
    "content": "\n// @require core/cash.ts\n// @require core/get_compare_function.ts\n// @require core/type_checking.ts\n// @require collection/filter.ts\n\ninterface Cash {\n  not ( comparator?: Comparator ): Cash;\n}\n\nfn.not = function ( this: Cash, comparator?: Comparator ) {\n\n  const compare = getCompareFunction ( comparator );\n\n  return this.filter ( ( i: number, ele: EleLoose ) => ( !isString ( comparator ) || isElement ( ele ) ) && !compare.call ( ele, i, ele ) );\n\n};\n"
  },
  {
    "path": "src/traversal/parent.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n\ninterface Cash {\n  parent ( comparator?: Comparator ): Cash;\n}\n\nfn.parent = function ( this: Cash, comparator?: Comparator ) {\n\n  return filtered ( cash ( unique ( pluck ( this, 'parentNode' ) ) ), comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/parents.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require core/matches.ts\n// @require core/unique.ts\n// @require core/variables.ts\n// @require collection/each.ts\n\ninterface Cash {\n  parents ( comparator?: Comparator, _until?: Comparator ): Cash;\n}\n\nfn.parents = function ( this: Cash, comparator?: Comparator, _until?: Comparator ) {\n\n  return filtered ( cash ( unique ( pluck ( this, 'parentElement', true, _until ) ) ), comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/parents_until.ts",
    "content": "\n// @require ./parents.ts\n\ninterface Cash {\n  parentsUntil ( until?: Comparator, comparator?: Comparator): Cash;\n}\n\nfn.parentsUntil = function ( this: Cash, until?: Comparator, comparator?: Comparator ) {\n\n  return this.parents ( comparator, until );\n\n};\n"
  },
  {
    "path": "src/traversal/prev.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n\ninterface Cash {\n  prev ( comparator?: Comparator, _all?: boolean, _until?: Comparator ): Cash;\n}\n\nfn.prev = function ( this: Cash, comparator?: Comparator, _all?: boolean, _until?: Comparator ) {\n\n  return filtered ( cash ( unique ( pluck ( this, 'previousElementSibling', _all, _until ) ) ), comparator );\n\n};\n"
  },
  {
    "path": "src/traversal/prev_all.ts",
    "content": "\n// @require ./prev.ts\n\ninterface Cash {\n  prevAll ( comparator?: Comparator ): Cash;\n}\n\nfn.prevAll = function ( this: Cash, comparator?: Comparator ) {\n\n  return this.prev ( comparator, true );\n\n};\n"
  },
  {
    "path": "src/traversal/prev_until.ts",
    "content": "\n// @require ./prev.ts\n\ninterface Cash {\n  prevUntil ( until?: Comparator, comparator?: Comparator ): Cash;\n}\n\nfn.prevUntil = function ( this: Cash, until?: Comparator, comparator?: Comparator ) {\n\n  return this.prev ( comparator, true, until );\n\n};\n"
  },
  {
    "path": "src/traversal/siblings.ts",
    "content": "\n// @require core/cash.ts\n// @require core/filtered.ts\n// @require core/pluck.ts\n// @require core/unique.ts\n// @require core/variables.ts\n// @require collection/each.ts\n// @require ./children.ts\n// @require ./not.ts\n// @require ./parent.ts\n\ninterface Cash {\n  siblings ( comparator?: Comparator ): Cash;\n}\n\nfn.siblings = function ( this: Cash, comparator?: Comparator ) {\n\n  return filtered ( cash ( unique ( pluck ( this, ele => cash ( ele ).parent ().children ().not ( ele ) ) ) ), comparator );\n\n};\n"
  },
  {
    "path": "tasks/build.sh",
    "content": "\n# CLEANUP\nrm -rf dist\nmkdir dist\n\n# ESM\nnpx minipacco bundle src/export_esm.ts > dist/cash.esm.ts\nnpx tsc --target es2016 --skipLibCheck --declaration dist/cash.esm.ts\nmv dist/cash.esm.ts dist/cash.ts\nmv dist/cash.esm.d.ts dist/cash.d.ts\nmv dist/cash.esm.js dist/cash.esm.js\n\n# CJS\nnpx minipacco bundle src/export_cjs.ts > dist/cash.cjs.ts\nnpx tsc --target es5 --skipLibCheck dist/cash.cjs.ts\nnode -e 'fs.writeFileSync(\"dist/cash.cjs.js\",`(function(){\\n\"use strict\";\\n${fs.readFileSync(\"dist/cash.cjs.js\",\"utf8\")}})();`);'\nnpx esbuild --minify dist/cash.cjs.js > dist/cash.cjs.min.js\nmv dist/cash.cjs.js dist/cash.js\nmv dist/cash.cjs.min.js dist/cash.min.js\nrm dist/cash.cjs.ts\n"
  },
  {
    "path": "test/helpers.js",
    "content": "\n/* FIXTURES */\n\nfunction getFixtureInit ( fixture ) {\n  return function init () {\n    document.getElementById ( 'qunit-fixture' ).innerHTML = fixture;\n  };\n}\n\n/* SUPPORTS */\n\nvar Supports = {\n  CSSvariables: window.CSS && window.CSS.supports && window.CSS.supports ( '--f:0' ),\n  template: !!$('<template>')[0].content\n};\n"
  },
  {
    "path": "test/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <title>Cash Test Suite</title>\n    <link rel=\"stylesheet\" href=\"../node_modules/qunit/qunit/qunit.css\">\n    <script src=\"../node_modules/qunit/qunit/qunit.js\"></script>\n    <script src=\"../node_modules/qunit-ava-spec/dist/index.js\"></script>\n  </head>\n  <body>\n    <div id=\"qunit\"></div>\n    <div id=\"qunit-fixture\"></div>\n    <script src=\"../dist/cash.js\"></script>\n    <script src=\"./helpers.js\"></script>\n    <script src=\"./modules/attributes.js\"></script>\n    <script src=\"./modules/collection.js\"></script>\n    <script src=\"./modules/core.js\"></script>\n    <script src=\"./modules/css.js\"></script>\n    <script src=\"./modules/data.js\"></script>\n    <script src=\"./modules/dimensions.js\"></script>\n    <script src=\"./modules/effects.js\"></script>\n    <script src=\"./modules/events.js\"></script>\n    <script src=\"./modules/forms.js\"></script>\n    <script src=\"./modules/manipulation.js\"></script>\n    <script src=\"./modules/offset.js\"></script>\n    <script src=\"./modules/traversal.js\"></script>\n    <script src=\"./modules/utilities.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "test/jquery_patch.js",
    "content": "\nfor ( prop in cash ) {\n\n  if ( ['fn', 'each', 'extend'].indexOf ( prop ) >= 0 ) continue;\n\n  jQuery[prop] = cash[prop];\n\n}\n\nfor ( prop in cash.fn ) {\n\n  if ( ['init'].indexOf ( prop ) >= 0 ) continue;\n\n  jQuery.fn[prop] = cash.fn[prop];\n\n}\n\nfor ( prop in jQuery.fn ) {\n\n  if ( cash.fn[prop] ) continue;\n\n  cash.fn[prop] = jQuery.fn[prop];\n\n}\n\nwindow.$ = jQuery;\n"
  },
  {
    "path": "test/jquery_reverse_patch.js",
    "content": "\nfor ( prop in cash ) {\n\n  if ( jQuery[prop] ) continue;\n\n  jQuery[prop] = cash[prop];\n\n}\n\nwindow.$ = jQuery;\n"
  },
  {
    "path": "test/modules/attributes.js",
    "content": "\nvar fixture = '\\\n  <div class=\"attr\" one=\"one\"></div>\\\n  <div class=\"class\"></div>\\\n  <input class=\"prop\" type=\"checkbox\" checked>\\\n';\n\ndescribe ( 'Attributes', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.addClass', function ( it ) {\n\n    it ( 'supports single class', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'foo' );\n\n      t.true ( ele.hasClass ( 'foo' ) );\n\n    });\n\n    it ( 'supports multiple classes', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'foo bar' );\n\n      t.true ( ele.hasClass ( 'foo' ) );\n      t.true ( ele.hasClass ( 'bar' ) );\n\n    });\n\n    it ( 'doesn\\'t add duplicates', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'class-one class-one class-two class-one' );\n      ele.addClass ( 'class-two class-one class-one class-one' );\n\n      var matches = ele[0].className.match ( /class-one/g );\n\n      t.is ( matches.length, 1 );\n\n    });\n\n    it ( 'doesn\\'t throw on falsy values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 0 );\n      ele.addClass ( '' );\n      ele.addClass ( ' ' ); // Empty spaces will be removed\n      ele.addClass ( undefined );\n      ele.addClass ( null );\n\n      t.pass ();\n\n    });\n\n    it ( 'doesn\\'t throw on number values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 3.14 );\n      ele.addClass ( 4 );\n      ele.addClass ( Infinity );\n      ele.addClass ( NaN );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.attr', function ( it ) {\n\n    it ( 'gets attribute', function ( t ) {\n\n      var ele = $('.attr');\n\n      t.is ( ele.attr ( 'one' ), 'one' );\n\n    });\n\n    it ( 'sets attribute', function ( t ) {\n\n      var ele = $('.attr');\n\n      ele.attr ( 'one', 'uno' );\n\n      t.is ( ele.attr ( 'one' ), 'uno' );\n\n    });\n\n    it ( 'explicitly undefined values are ignored', function ( t ) {\n\n      var ele = $('.attr');\n\n      ele.attr ( 'one', undefined );\n\n      t.is ( ele.attr ( 'one' ), 'one' );\n\n    });\n\n    it ( 'supports setting an object of attributes', function ( t ) {\n\n      var ele = $('.attr');\n      var attrs = { one: 'uno', two: 'due' };\n\n      ele.attr ( attrs );\n\n      t.is ( ele.attr ( 'one' ), 'uno' );\n      t.is ( ele.attr ( 'two' ), 'due' );\n\n    });\n\n    it ( 'supports removing an attribute', function ( t ) {\n\n      var ele = $('.attr');\n\n      ele.attr ( 'one', null );\n\n      t.is ( ele.attr ( 'one' ), undefined );\n\n    });\n\n    it ( 'supports non-existent attribute', function ( t ) {\n\n      var ele = $('.attr');\n\n      t.is ( ele.attr ( 'foo' ), undefined );\n\n    });\n\n    it ( 'supports no arguments', function ( t ) {\n\n      var ele = $('.attr');\n\n      t.is ( ele.attr (), undefined );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.attr ( 'foo' ), undefined );\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(document.createTextNode ( '.css' ));\n\n      ele.attr ( 'foo', 'asd' ).attr ( 'foo' );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.hasClass', function ( it ) {\n\n    it ( 'supports single class', function ( t ) {\n\n      var ele = $('.class');\n\n      t.true ( ele.hasClass ( 'class' ) );\n      t.false ( ele.hasClass ( 'foo' ) );\n\n    });\n\n    it ( 'supports special characters', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'foo$bar' );\n\n      t.true ( ele.hasClass ( 'foo$bar' ) );\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(document.createTextNode ( '.css' ));\n\n      t.is ( ele.hasClass ( 'foo' ), false );\n\n    });\n\n    it ( 'doesn\\'t throw on falsy values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.hasClass ( 0 );\n      ele.hasClass ( '' );\n      ele.hasClass ( undefined );\n      ele.hasClass ( null );\n\n      t.pass ();\n\n    });\n\n    it ( 'doesn\\'t throw on number values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.hasClass ( 3.14 );\n      ele.hasClass ( 4 );\n      ele.hasClass ( Infinity );\n      ele.hasClass ( NaN );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.prop', function ( it ) {\n\n    it ( 'gets property', function ( t ) {\n\n      var ele = $('.prop');\n\n      t.true ( ele.prop ( 'checked' ) );\n      t.false ( ele.prop ( 'disabled' ) );\n\n    });\n\n    it ( 'sets property', function ( t ) {\n\n      var ele = $('.prop');\n\n      ele.prop ( 'checked', false );\n      ele.prop ( 'disabled', true );\n\n      t.true ( ele.prop ( 'disabled' ) );\n      t.false ( ele.prop ( 'checked' ) );\n\n    });\n\n    it ( 'supports setting an object of properties', function ( t ) {\n\n      var ele = $('.prop');\n      var props = { checked: false, disabled: true };\n\n      ele.prop ( props );\n\n      t.true ( ele.prop ( 'disabled' ) );\n      t.false ( ele.prop ( 'checked' ) );\n\n    });\n\n    it ( 'supports custom property', function ( t ) {\n\n      var ele = $('.prop');\n\n      t.is ( ele.prop ( 'foo' ), undefined );\n\n      ele.prop ( 'foo', 123 );\n\n      t.is ( ele.prop ( 'foo' ), 123 );\n\n    });\n\n    it ( 'supports no arguments', function ( t ) {\n\n      var ele = $('.prop');\n\n      t.is ( ele.prop (), undefined );\n\n    });\n\n    it ( 'maps special HTML attributes into the equivalent DOM properties', function ( t ) {\n\n      // For some reason calling `removeProp` with most of these properties doesn't work\n\n      var label = $('<label class=\"foo\" contenteditable=\"true\" for=\"input\"></label>');\n\n      t.is ( label.prop ( 'class' ), 'foo' );\n      label.prop ( 'class', 'bar' );\n      t.is ( label.prop ( 'class' ), 'bar' );\n      // label.removeProp ( 'class' );\n      // t.is ( label.prop ( 'class' ), undefined );\n\n      t.is ( label.prop ( 'contenteditable' ), 'true' );\n      label.prop ( 'contenteditable', 'false' );\n      t.is ( label.prop ( 'contenteditable' ), 'false' );\n      // label.removeProp ( 'contenteditable' );\n      // t.is ( label.prop ( 'contenteditable' ), undefined );\n\n      t.is ( label.prop ( 'for' ), 'input' );\n      label.prop ( 'for', 'textarea' );\n      t.is ( label.prop ( 'for' ), 'textarea' );\n      // label.removeProp ( 'for' );\n      // t.is ( label.prop ( 'for' ), undefined );\n\n      var input = $('<input type=\"text\" readonly=\"true\" maxlength=\"1\" tabindex=\"1\"></input>');\n\n      t.is ( input.prop ( 'readonly' ), true );\n      input.prop ( 'readonly', false );\n      t.is ( input.prop ( 'readonly' ), false );\n      // input.removeProp ( 'readonly' );\n      // t.is ( input.prop ( 'readonly' ), undefined );\n\n      t.is ( input.prop ( 'maxlength' ), 1 );\n      input.prop ( 'maxlength', 2 );\n      t.is ( input.prop ( 'maxlength' ), 2 );\n      // input.removeProp ( 'maxlength' );\n      // t.is ( input.prop ( 'maxlength' ), undefined );\n\n      t.is ( input.prop ( 'tabindex' ), 1 );\n      input.prop ( 'tabindex', 2 );\n      t.is ( input.prop ( 'tabindex' ), 2 );\n      // input.removeProp ( 'tabindex' );\n      // t.is ( input.prop ( 'tabindex' ), undefined );\n\n      var td = $('<td colspan=\"1\" rowspan=\"1\"></td>');\n\n      t.is ( td.prop ( 'colspan' ), 1 );\n      td.prop ( 'colspan', 2 );\n      t.is ( td.prop ( 'colspan' ), 2 );\n      // td.removeProp ( 'colspan' );\n      // t.is ( td.prop ( 'colspan' ), undefined );\n\n      t.is ( td.prop ( 'rowspan' ), 1 );\n      td.prop ( 'rowspan', 2 );\n      t.is ( td.prop ( 'rowspan' ), 2 );\n      // td.removeProp ( 'rowspan' );\n      // t.is ( td.prop ( 'rowspan' ), undefined );\n\n      var img = $('<img usemap=\"#1\" />');\n\n      t.is ( img.prop ( 'usemap' ), '#1' );\n      img.prop ( 'usemap', '#2' );\n      t.is ( img.prop ( 'usemap' ), '#2' );\n      // img.removeProp ( 'usemap' );\n      // t.is ( img.prop ( 'usemap' ), undefined );\n\n    });\n\n    it.skip ( 'doesn\\'t have prototype inheritance issues', function ( t ) {\n\n      var ele = $('.event');\n\n      t.is ( ele.prop ( 'constructor' ), ele[0].constructor );\n\n    });\n\n  });\n\n  describe ( '$.fn.removeAttr', function ( it ) {\n\n    it ( 'removes attribute', function ( t ) {\n\n      var ele = $('.attr');\n\n      ele.removeAttr ( 'one' );\n\n      t.is ( ele.attr ( 'one' ), undefined );\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(document.createTextNode ( '.css' ));\n\n      ele.removeAttr ( 'foo' );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.removeClass', function ( it ) {\n\n    it ( 'supports single class', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.removeClass ( 'class' );\n\n      t.false ( ele.hasClass ( 'class' ) );\n\n    });\n\n    it ( 'supports multiple classes', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'foo' );\n      ele.removeClass ( 'class foo' );\n\n      t.false ( ele.hasClass ( 'class' ) );\n      t.false ( ele.hasClass ( 'foo' ) );\n\n    });\n\n    it ( 'supports removing all classes', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'foo bar' );\n      ele.removeClass ();\n\n      t.false ( ele.hasClass ( 'class' ) );\n      t.false ( ele.hasClass ( 'foo' ) );\n      t.false ( ele.hasClass ( 'bar' ) );\n\n    });\n\n    it ( 'supports special characters', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.addClass ( 'foo$bar' ).removeClass ( 'foo$bar' );\n\n      t.false ( ele.hasClass ( 'foo$bar' ) );\n\n    });\n\n    it ( 'doesn\\'t throw on falsy values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.removeClass ( 0 );\n      ele.removeClass ( '' );\n      ele.removeClass ( ' ' ); // Empty spaces will be removed\n      ele.removeClass ( undefined );\n      ele.removeClass ( null );\n\n      t.pass ();\n\n    });\n\n    it ( 'doesn\\'t throw on number values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.removeClass ( 3.14 );\n      ele.removeClass ( 4 );\n      ele.removeClass ( Infinity );\n      ele.removeClass ( NaN );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.removeProp', function ( it ) {\n\n    it ( 'removes property', function ( t ) {\n\n      var ele = $('.prop');\n\n      ele.prop ( 'foo', 123 );\n\n      t.is ( ele.prop ( 'foo' ), 123 );\n\n      ele.removeProp ( 'foo' );\n\n      t.is ( ele.prop ( 'foo' ), undefined );\n\n    });\n\n  });\n\n  describe ( '$.fn.toggleClass', function ( it ) {\n\n    it ( 'supports adding', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 'foo' );\n\n      t.true ( ele.hasClass ( 'foo' ) );\n\n    });\n\n    it ( 'supports force adding', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 'class', true );\n\n      t.true ( ele.hasClass ( 'class' ) );\n\n    });\n\n    it ( 'supports removing', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 'class' );\n\n      t.false ( ele.hasClass ( 'class' ) );\n\n    });\n\n    it ( 'supports force removing', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 'foo', false );\n\n      t.false ( ele.hasClass ( 'foo' ) );\n\n    });\n\n    it ( 'supports multiple classes', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 'foo bar' );\n\n      t.true ( ele.hasClass ( 'foo' ) );\n      t.true ( ele.hasClass ( 'bar' ) );\n\n      ele.toggleClass ( 'foo bar' );\n\n      t.false ( ele.hasClass ( 'foo' ) );\n      t.false ( ele.hasClass ( 'bar' ) );\n\n    });\n\n    it ( 'supports special characters', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 'foo$bar' );\n\n      t.true ( ele.hasClass ( 'foo$bar' ) );\n\n      ele.toggleClass ( 'foo$bar' );\n\n      t.false ( ele.hasClass ( 'foo$bar' ) );\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(document.createTextNode ( '.css' ));\n\n      ele.toggleClass ( 'foo' ).toggleClass ( 'foo' ).toggleClass ( 'foo' );\n\n      t.pass ();\n\n    });\n\n    it ( 'doesn\\'t throw on falsy values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 0 );\n      ele.toggleClass ( '' );\n      ele.toggleClass ( ' ' ); // Empty spaces will be removed\n      ele.toggleClass ( undefined );\n      ele.toggleClass ( null );\n\n      t.pass ();\n\n    });\n\n    it ( 'doesn\\'t throw on number values', function ( t ) {\n\n      var ele = $('.class');\n\n      ele.toggleClass ( 3.14 );\n      ele.toggleClass ( 4 );\n      ele.toggleClass ( Infinity );\n      ele.toggleClass ( NaN );\n\n      t.pass ();\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/collection.js",
    "content": "\nvar fixture = '\\\n  <div class=\"prevprev sibling\"></div>\\\n  <div class=\"prev sibling\"></div>\\\n  <div class=\"anchor sibling\"></div>\\\n  <div class=\"next sibling\"></div>\\\n  <div class=\"nextnext sibling\"></div>\\\n';\n\ndescribe ( 'Collection', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.add', function ( it ) {\n\n    it ( 'supports selector', function ( t ) {\n\n      var ele = $('.anchor');\n      var added = ele.add ( '.prev, .next' );\n\n      t.is ( added.length, 3 );\n\n    });\n\n    it ( 'supports DOM node', function ( t ) {\n\n      var ele = $('.anchor');\n      var added = ele.add ( document.body );\n\n      t.is ( added.length, 2 );\n      t.true ( added.get ().indexOf ( ele[0] ) >= 0 );\n      t.true ( added.get ().indexOf ( document.body ) >= 0 );\n\n    });\n\n    it ( 'supports Cash instances', function ( t ) {\n\n      var ele = $('.anchor');\n      var next = $('.next');\n      var added = ele.add ( next ).add ( $() );\n\n      t.is ( added.length, 2 );\n\n    });\n\n    it ( 'doesn\\'t add duplicates', function ( t ) {\n\n      var ele = $('.anchor');\n      var added = ele.add ( '.sibling' );\n\n      t.is ( added.length, 5 );\n\n    });\n\n  });\n\n  describe ( '$.fn.each', function ( it ) {\n\n    it ( 'iterates over elements', function ( t ) {\n\n      var siblings = $('.sibling');\n      var indexes = [];\n      var eles = [];\n      var thats = [];\n\n      siblings.each ( function ( index, ele ) {\n        indexes.push ( index );\n        eles.push ( ele );\n        thats.push ( this );\n      });\n\n      t.deepEqual ( indexes, [0, 1, 2, 3, 4] );\n      t.deepEqual ( eles, siblings.get () );\n      t.deepEqual ( thats, siblings.get () );\n\n    });\n\n  });\n\n  describe ( '$.fn.eq', function ( it ) {\n\n    it ( 'gets the element at index', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      siblings.each ( function ( index ) {\n        t.is ( siblings.eq ( index )[0], siblings[index] );\n      });\n\n    });\n\n    it ( 'supports string indexes', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      siblings.each ( function ( index ) {\n        t.is ( siblings.eq ( String ( index ) )[0], siblings[index] );\n      });\n\n    });\n\n  });\n\n  describe ( '$.fn.filter', function ( it ) {\n\n    it ( 'supports selector', function ( t ) {\n\n      var siblings = $('.sibling');\n      var filtered = siblings.filter ( '.prev, .next' );\n\n      t.is ( filtered.length, 2 );\n\n    });\n\n    it ( 'supports DOM node', function ( t ) {\n\n      var anchor = $('.anchor');\n      var siblings = $('.sibling');\n      var filtered = siblings.filter ( anchor[0] );\n\n      t.is ( filtered.length, 1 );\n      t.is ( filtered[0], anchor[0] );\n\n    });\n\n    it ( 'supports function', function ( t ) {\n\n      var siblings = $('.sibling');\n      var indexes = [];\n      var eles = [];\n      var thats = [];\n\n      var filtered = siblings.filter ( function ( index, ele ) {\n        indexes.push ( index );\n        eles.push ( ele );\n        thats.push ( this );\n        return !!index;\n      });\n\n      t.deepEqual ( indexes, [0, 1, 2, 3, 4] );\n      t.deepEqual ( eles, siblings.get () );\n      t.deepEqual ( thats, siblings.get () );\n      t.deepEqual ( filtered.get (), siblings.slice ( 1 ).get () );\n\n    });\n\n    it ( 'doesn\\'t throw with an empty selector', function ( t ) {\n\n      $('*').filter ( '' );\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.first', function ( it ) {\n\n    it ( 'gets a collection containing the first element', function ( t ) {\n\n      var siblings = $('.sibling');\n      var first = siblings.first ();\n\n      t.true ( first.hasClass ( 'prevprev' ) );\n\n    });\n\n  });\n\n  describe ( '$.fn.get', function ( it ) {\n\n    it ( 'gets a single element', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      siblings.each ( function ( index ) {\n        t.is ( siblings.get ( index ), siblings[index] );\n      });\n\n    });\n\n    it ( 'gets all elements', function ( t ) {\n\n      var siblings = $('.sibling');\n      var arr = siblings.get ();\n\n      t.true ( $.isArray ( arr ) );\n      t.is ( arr.length, 5 );\n      t.deepEqual ( arr, [siblings[0], siblings[1], siblings[2], siblings[3], siblings[4]] );\n\n    });\n\n    it ( 'supports string indexes', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      siblings.each ( function ( index ) {\n        t.is ( siblings.get ( String ( index ) ), siblings[index] );\n      });\n\n    });\n\n  });\n\n  describe ( '$.fn.index', function ( it ) {\n\n    it ( 'gets index of collection element', function ( t ) {\n\n      var anchor = $('.anchor');\n\n      t.is ( anchor.index (), 2 );\n\n    });\n\n    it ( 'gets index of selector', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      t.is ( siblings.index ( '.anchor' ), 2 );\n\n    });\n\n  });\n\n  describe ( '$.fn.last', function ( it ) {\n\n    it ( 'gets a collection containing the last element', function ( t ) {\n\n      var siblings = $('.sibling');\n      var last = siblings.last ();\n\n      t.true ( last.hasClass ( 'nextnext' ) );\n\n    });\n\n  });\n\n  describe ( '$.fn.map', function ( it ) {\n\n    it ( 'maps over elements', function ( t ) {\n\n      var siblings = $('.sibling');\n      var body = document.body;\n      var indexes = [];\n      var eles = [];\n      var thats = [];\n\n      var mapped = siblings.map ( function ( index, ele ) {\n        indexes.push ( index );\n        eles.push ( ele );\n        thats.push ( this );\n        return body;\n      });\n\n      t.deepEqual ( indexes, [0, 1, 2, 3, 4] );\n      t.deepEqual ( eles, siblings.get () );\n      t.deepEqual ( thats, siblings.get () );\n      t.deepEqual ( mapped.get (), [body, body, body, body, body] );\n\n    });\n\n    it ( 'supports callbacks that returns multiple elements', function ( t ) {\n\n      var mapped = $('<div>').map ( function () {\n\n        return [document.head, document.body];\n\n      });\n\n      t.is ( mapped.length, 2 );\n      t.true ( mapped.get ().indexOf ( document.head ) >= 0 );\n      t.true ( mapped.get ().indexOf ( document.body ) >= 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.slice', function ( it ) {\n\n    it ( 'gets a slice', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      t.is ( siblings.slice ( 2 ).length, 3 );\n      t.is ( siblings.slice ( 2, 3 ).length, 1 );\n      t.deepEqual ( siblings.slice ( 2, 3 ).get (), siblings.eq ( 2 ).get () );\n      t.deepEqual ( siblings.slice ( -1 ).get (), siblings.eq ( 4 ).get () );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/core.js",
    "content": "\nvar fixture = '\\\n  <div id=\"123-ção\" class=\"123-ção\"></div>\\\n  <div id=\"id.with.dots\" class=\"class.with.dots\"></div>\\\n  <div id=\"id\" class=\"class\"></div>\\\n  <div id=\"id\"></div>\\\n  <div id=\"id\"></div>\\\n  <div class=\"single\"></div>\\\n  <div class=\"multiple\"><div class=\"child\"></div></div>\\\n  <div class=\"multiple\"><div class=\"child\"></div></div>\\\n  <main></main>\\\n  <main></main>\\\n';\n\ndescribe ( 'Core', { beforeEach: getFixtureInit ( fixture ) }, function ( it ) {\n\n  it ( '$() instanceof $', function ( t ) {\n\n    t.true ( $() instanceof $ );\n\n  });\n\n  describe ( 'Collections', function ( it ) {\n\n    ( typeof Symbol === 'function' ? it : it.skip )( 'are iterable', function ( t ) { // It only works on browsers with support for Symbol\n\n      var $eles = $('.multiple');\n\n      t.true ( $eles[Symbol.iterator] === Array.prototype[Symbol.iterator] );\n\n    });\n\n  });\n\n  describe ( 'Plugins', function ( it ) {\n\n    it ( '$.fn is prototype', function ( t ) {\n\n      var plugin = function () {};\n\n      $.fn.plugin = plugin;\n\n      t.is ( $().plugin, plugin );\n\n    });\n\n    it ( '$.fn.extend adds plugins', function ( t ) {\n\n      var foo = function () {};\n      var bar = function () {};\n\n      $.fn.extend ({ foo: foo, bar: bar });\n\n      t.is ( $().foo, foo );\n      t.is ( $().bar, bar );\n\n    });\n\n  });\n\n  describe ( 'Selector', function ( it ) {\n\n    it ( 'supports falsy values', function ( t ) {\n\n      t.is ( $().length, 0 );\n      t.is ( $(0).length, 0 );\n      t.is ( $('').length, 0 );\n      t.is ( $(undefined).length, 0 );\n      t.is ( $(null).length, 0 );\n\n    });\n\n    it ( 'supports ID', function ( t ) {\n\n      t.is ( $('#id').length, 1 );\n\n    });\n\n    it ( 'supports unusual IDs', function ( t ) {\n\n      t.is ( $('#123-ção').length, 1 );\n\n    });\n\n    it ( 'supports IDs with dots', function ( t ) {\n\n      t.is ( $('#id\\\\.with\\\\.dots').length, 1 );\n\n    });\n\n    it ( 'supports ID with class', function ( t ) {\n\n      t.is ( $('#id.class').length, 1 );\n\n    });\n\n    it ( 'supports non-existent ID', function ( t ) {\n\n      t.is ( $('#foo').length, 0 );\n\n    });\n\n    it ( 'supports class', function ( t ) {\n\n      t.is ( $('.single').length, 1 );\n      t.is ( $('.multiple').length, 2 );\n\n    });\n\n    it ( 'supports unusual class', function ( t ) {\n\n      t.is ( $('.123-ção').length, 1 );\n\n    });\n\n    it ( 'supports class with dots', function ( t ) {\n\n      t.is ( $('.class\\\\.with\\\\.dots').length, 1 );\n\n    });\n\n    it ( 'supports non-existent class', function ( t ) {\n\n      t.is ( $('.foo').length, 0 );\n\n    });\n\n    it ( 'supports tag', function ( t ) {\n\n      t.is ( $('html').length, 1 );\n      t.is ( $('main').length, 2 );\n\n    });\n\n    it ( 'supports non-existent tag', function ( t ) {\n\n      t.is ( $('foo').length, 0 );\n\n    });\n\n    it ( 'supports DOM node', function ( t ) {\n\n      var body = $(document.body);\n\n      t.is ( body.length, 1 );\n      t.is ( body[0], document.body );\n\n    });\n\n    it ( 'supports array of DOM nodes', function ( t ) {\n\n      var eles = $([document.documentElement, document.body]);\n\n      t.is ( eles.length, 2 );\n      t.is ( eles[0], document.documentElement );\n      t.is ( eles[1], document.body );\n\n    });\n\n    it ( 'supports HTML string', function ( t ) {\n\n      t.is ( $('<div class=\"html\"><p>paragraph</p></div>').length, 1 );\n\n    });\n\n    QUnit.test ( 'supports function', function ( assert ) { // For some reason we can't use our nice helpers for async assertions :(\n\n      var done = assert.async ();\n      var count = 0;\n      var handler = function () {\n        count++;\n      };\n\n      t.is ( count, 0 );\n\n      $(handler);\n\n      setTimeout ( function () {\n        t.is ( count, 1 );\n        done ();\n      }, 100 );\n\n    });\n\n    it ( 'supports Cash instances', function ( t ) {\n\n      var ele = $($(document.body));\n\n      t.is ( ele.length, 1 );\n      t.is ( ele[0], document.body );\n\n    });\n\n  });\n\n  describe ( 'Context', function ( it ) {\n\n    it ( 'supports a DOM node', function ( t ) {\n\n      var context = $('<div><div class=\"subcontext\"></div></div>');\n\n      t.is ( $('.subcontext').length, 0 );\n      t.is ( $( '.subcontext', context[0] ).length, 1 );\n\n    });\n\n    it ( 'supports a Cash instance', function ( t ) {\n\n      var context = $('<div><div class=\"subcontext\"></div></div>');\n\n      t.is ( $('.subcontext').length, 0 );\n      t.is ( $( '.subcontext', context ).length, 1 );\n      t.is ( $( '.child', $('.multiple') ).length, 2 );\n\n    });\n\n    it ( 'supports selector', function ( t ) {\n\n      t.is ( $( '.child', '.multiple' ).length, 2 );\n\n    });\n\n    it ( 'supports a document', function ( t ) {\n\n      var doc = document.implementation.createDocument ( 'http://www.w3.org/1999/xhtml', 'html', null );\n      var ele = $('<p id=\"foo\">')[0];\n\n      $(doc.documentElement).append ( ele );\n\n      t.is ( $('#foo', doc)[0], ele );\n\n    });\n\n    it ( 'supports searching by id in a disconnected DOM node', function ( t ) {\n\n      var div = document.createElement ( 'div' );\n      var span = document.createElement ( 'span' );\n\n      div.appendChild ( span );\n\n      $(span).attr ( 'id', 'foo' );\n\n      var found = $('#foo', div);\n\n      t.is ( found.length, 1 );\n      t.is ( found[0], span );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/css.js",
    "content": "\nvar fixture = '\\\n  <div class=\"css\" style=\"height: 50px; position: static;\"></div>\\\n';\n\ndescribe ( 'CSS', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.css', function ( it ) {\n\n    it ( 'gets the value of a property', function ( t ) {\n\n      var ele = $('.css');\n\n      t.is ( ele.css ( 'height' ), '50px' );\n      t.is ( ele.css ( 'position' ), 'static' );\n\n    });\n\n    it ( 'gets the value of a property (disconnected node)', function ( t ) {\n\n      var ele = $('<div></div>');\n\n      ele.css ({ top: 10 });\n\n      t.is ( ele.css ( 'top' ), '10px' );\n\n    });\n\n    it ( 'sets the value of a property', function ( t ) {\n\n      var ele = $('.css');\n\n      ele.css ( 'height', '100px' );\n\n      t.is ( ele.css ( 'height' ), '100px' );\n\n    });\n\n    it ( 'supports setting an object of properties', function ( t ) {\n\n      var ele = $('.css');\n      var props = { height: '100px', width: '100px' };\n\n      ele.css ( props );\n\n      t.is ( ele.css ( 'width' ), '100px' );\n      t.is ( ele.css ( 'height' ), '100px' );\n\n    });\n\n    if ( Supports.CSSvariables ) {\n\n      it ( 'supports custom variables', function ( t ) {\n\n        var ele = $('.css');\n\n        t.is ( ele.css ( '--foo' ), undefined );\n        t.is ( ele.css ( '--bar' ), undefined );\n\n        ele.css ( '--foo', 0 );\n        ele.css ( '--bar', 'content' );\n\n        t.is ( ele.css ( '--foo' ), '0' );\n        t.is ( ele.css ( '--bar' ), 'content' );\n\n      });\n\n    }\n\n    it ( 'supports invalid properties', function ( t ) {\n\n      var ele = $('.css');\n\n      t.is ( ele.css ( 'foo' ), undefined );\n\n      ele.css ( 'foo', 123 );\n\n      t.is ( ele.css ( 'foo' ), undefined );\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(document.createTextNode ( '.css' ));\n\n      t.is ( ele.css ( 'width' ), undefined );\n\n      ele.css ( 'width', 10 );\n\n      t.pass ();\n\n    });\n\n    it.skip ( 'doesn\\'t have prototype inheritance issues', function ( t ) {\n\n      var ele = $('.css');\n\n      ele.css ( 'constructor', '3px' );\n\n      t.is ( ele.css ( 'constructor' ), '3px' );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/data.js",
    "content": "\nvar fixture = '\\\n  <div class=\"data\" data-one=\"one\" data-two=\"two\" data-multi-words=\"three\"></div>\\\n  <div class=\"data-whitespace\" data-leading=\"  {}\" data-trailing=\"{}  \"></div>\\\n';\n\ndescribe ( 'Data', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.data', function ( it ) {\n\n    it ( 'gets data', function ( t ) {\n\n      var ele = $('.data');\n\n      t.is ( ele.data ( 'one' ), 'one' );\n      t.is ( ele.data ( 'two' ), 'two' );\n\n    });\n\n    it ( 'supports various data types', function ( t ) {\n\n      var ele = $('.data');\n\n      ele.data ( 'true', true );\n      ele.data ( 'false', false );\n      ele.data ( 'null', null );\n      ele.data ( 'int', 3 );\n      ele.data ( 'float', 3.14 );\n      ele.data ( 'string', 'foo' );\n      ele.data ( 'object', { json: true } );\n      ele.data ( 'array', [1, 2, 3] );\n\n      t.is ( ele.data ( 'true' ), true );\n      t.is ( ele.data ( 'false' ), false );\n      t.is ( ele.data ( 'null' ), null );\n      t.is ( ele.data ( 'int' ), 3 );\n      t.is ( ele.data ( 'float' ), 3.14 );\n      t.is ( ele.data ( 'string' ), 'foo' );\n      t.deepEqual ( ele.data ( 'object' ), { json: true } );\n      t.deepEqual ( ele.data ( 'array' ), [1, 2, 3] );\n\n    });\n\n    it ( 'supports retrieving multi-words attributes, even if already camel-case-ized', function ( t ) {\n\n      var ele = $('.data');\n\n      t.is ( ele.data ( 'multi-words' ), 'three' );\n      t.is ( ele.data ( 'multiWords' ), 'three' );\n\n    });\n\n    it ( 'doesn\\'t cache the values', function ( t ) {\n\n      var ele = $('.data');\n\n      t.is ( ele.data ( 'one' ), 'one' );\n      ele[0].setAttribute ( 'data-one', 'uno' );\n      t.is ( ele.data ( 'one' ), 'uno' );\n\n    });\n\n    it ( 'gets all data', function ( t ) {\n\n      var ele = $('.data');\n      var data = ele.data ();\n\n      t.deepEqual ( data, { one: 'one', two: 'two', multiWords: 'three' } );\n\n    });\n\n    it ( 'sets data', function ( t ) {\n\n      var ele = $('.data');\n\n      ele.data ( 'one', 'uno' );\n      ele.data ( 'three', 3 );\n\n      t.is ( ele.data ( 'one' ), 'uno' );\n      t.is ( ele.data ( 'three' ), 3 );\n\n    });\n\n    it ( 'supports setting an object of data', function ( t ) {\n\n      var ele = $('.data');\n      var data = { one: 'uno', two: 'due' };\n\n      ele.data ( data );\n\n      t.is ( ele.data ( 'one' ), 'uno' );\n      t.is ( ele.data ( 'two' ), 'due' );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.data (), undefined );\n      t.is ( ele.data ( 'one' ), undefined );\n\n    });\n\n    it ( 'reads strings with leading/trailing whitespace as plain strings', function ( t ) {\n\n      var ele = $('.data-whitespace');\n\n      t.is ( ele.data ( 'leading' ), '  {}' );\n      t.is ( ele.data ( 'trailing' ), '{}  ' );\n\n    });\n\n    it ( 'explicitly undefined values are ignored', function ( t ) {\n\n      var ele = $('div');\n\n      ele.data ( 'test', 'foo' );\n      ele.data( 'test', undefined );\n\n      t.is ( ele.data ( 'test' ), 'foo' );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/dimensions.js",
    "content": "\nvar fixture = '\\\n  <div class=\"rectangle\" style=\"width: 100px; height: 50px; padding: 5px; margin: 10px; border: 1px solid red;\"></div>\\\n';\n\ndescribe ( 'Dimensions', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.height', function ( it ) {\n\n    it ( 'gets the height of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.height (), 50 );\n\n    });\n\n    it ( 'gets the height of the window', function ( t ) {\n\n      var val = $(window).height ();\n\n      t.is ( val, document.documentElement.clientHeight );\n\n    });\n\n    it ( 'sets the height of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      ele.height ( '200px' );\n\n      t.is ( Math.round ( ele.height () ), 200 ); // Rounding to work around browsers returning floats\n\n    });\n\n    it ( 'supports unitless numbers', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      ele.height ( 200 );\n\n      t.is ( Math.round ( ele.height () ), 200 ); // Rounding to work around browsers returning floats\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(window);\n\n      ele.height ( 10 );\n\n      t.pass ();\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.height (), undefined );\n      t.is ( ele.height ( 100 ), ele );\n\n    });\n\n  });\n\n  describe ( '$.fn.innerHeight', function ( it ) {\n\n    it ( 'gets the inner height of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.innerHeight (), 60 );\n\n    });\n\n    it ( 'gets the inner height of the window', function ( t ) {\n\n      var val = $(window).innerHeight ();\n\n      t.is ( val, document.documentElement.clientHeight );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.innerHeight (), undefined );\n\n    });\n\n  });\n\n  describe ( '$.fn.outerHeight', function ( it ) {\n\n    it ( 'gets the outer height of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.outerHeight (), 62 );\n\n    });\n\n    it ( 'gets the outer height of the window', function ( t ) {\n\n      var val = $(window).outerHeight ();\n\n      t.is ( val, window.innerHeight );\n\n    });\n\n    it ( 'can include margins', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.outerHeight ( true ), 82 );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.outerHeight (), undefined );\n\n    });\n\n  });\n\n  describe ( '$.fn.width', function ( it ) {\n\n    it ( 'gets the width of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.width (), 100 );\n\n    });\n\n    it ( 'gets the width of the window', function ( t ) {\n\n      var val = $(window).width ();\n\n      t.is ( val, document.documentElement.clientWidth );\n\n    });\n\n    it ( 'sets the width of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      ele.width ( '200px' );\n\n      t.is ( Math.round ( ele.width () ), 200 ); // Rounding to work around browsers returning floats\n\n    });\n\n    it ( 'supports unitless numbers', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      ele.width ( 200 );\n\n      t.is ( Math.round ( ele.width () ), 200 ); // Rounding to work around browsers returning floats\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var ele = $(window);\n\n      ele.width ( 10 );\n\n      t.pass ();\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.width (), undefined );\n      t.is ( ele.width ( 100 ), ele );\n\n    });\n\n  });\n\n  describe ( '$.fn.innerWidth', function ( it ) {\n\n    it ( 'gets the inner width of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.innerWidth (), 110 );\n\n    });\n\n    it ( 'gets the inner width of the window', function ( t ) {\n\n      var val = $(window).innerWidth ();\n\n      t.is ( val, document.documentElement.clientWidth );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.innerWidth (), undefined );\n\n    });\n\n  });\n\n  describe ( '$.fn.outerWidth', function ( it ) {\n\n    it ( 'gets the outer width of a DOM element', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.outerWidth (), 112 );\n\n    });\n\n    it ( 'gets the outer width of the window', function ( t ) {\n\n      var val = $(window).outerWidth ();\n\n      t.is ( val, window.innerWidth );\n\n    });\n\n    it ( 'can include margins', function ( t ) {\n\n      var ele = $('.rectangle');\n\n      t.is ( ele.outerWidth ( true ), 132 );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.outerWidth (), undefined );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/effects.js",
    "content": "\nvar fixture = '\\\n  <style>.show-custom { display: inline-block }</style>\\\n  <style>.show-custom-style { display: flex }</style>\\\n  <style>.show-cls { display: block }</style>\\\n  <style>.hide-cls { display: none }</style>\\\n  <div class=\"toggleable shown\"></div>\\\n  <div class=\"toggleable shown show-cls\"></div>\\\n  <div class=\"toggleable shown\" style=\"display: block\"></div>\\\n  <div class=\"toggleable hidden hide-cls\"></div>\\\n  <div class=\"toggleable hidden\" style=\"display: none\"></div>\\\n  <span class=\"toggleable hide-cls\"></span>\\\n  <span class=\"show-custom\"></span>\\\n  <span class=\"show-custom-style\"></span>\\\n';\n\nfunction isDisplay ( collection, display ) {\n  return [].every.call ( collection, function ( ele ) {\n    return $(ele).css ( 'display' ) === display;\n  });\n}\n\nfunction isShown ( collection ) {\n  return [].every.call ( collection, function ( ele ) {\n    return $(ele).css ( 'display' ) !== 'none';\n  });\n}\n\nfunction isHidden ( collection ) {\n  return [].every.call ( collection, function ( ele ) {\n    return $(ele).css ( 'display' ) === 'none';\n  });\n}\n\ndescribe ( 'Effects', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.hide', function ( it ) {\n\n    it ( 'hides elements', function ( t ) {\n\n      var eles = $('.toggleable');\n\n      eles.hide ();\n\n      t.true ( isHidden ( eles ) );\n\n    });\n\n  });\n\n  describe ( '$.fn.show', function ( it ) {\n\n    it ( 'shows elements', function ( t ) {\n\n      var eles = $('.toggleable');\n\n      eles.show ();\n\n      t.true ( isShown ( eles ) );\n\n    });\n\n    it ( 'uses the previous display value', function ( t ) {\n\n      var ele = $('.show-custom');\n\n      ele.hide ().show ();\n\n      t.is ( ele[0].style.display, 'inline-block' );\n\n    });\n\n    it ( 'uses the default display value', function ( t ) {\n\n      var span = $('#qunit-fixture span');\n\n      span.show ();\n\n      t.is ( span.css ( 'display' ), 'inline' );\n\n    });\n\n    it ( 'shows even hidden-by-default elements', function ( t ) {\n\n      var title = $('<title>Title<title>');\n\n      title.appendTo ( document.body );\n\n      t.is ( title.css ( 'display' ), 'none' );\n\n      title.show ();\n\n      t.is ( title.css ( 'display' ), 'block' );\n\n      title.detach ();\n\n    });\n\n  });\n\n  describe ( '$.fn.toggle', function ( it ) {\n\n    it ( 'supports showing', function ( t ) {\n\n      var eles = $('.hidden');\n\n      eles.toggle ();\n\n      t.true ( isShown ( eles ) );\n\n    });\n\n    it ( 'supports force showing', function ( t ) {\n\n      var eles = $('.hidden');\n\n      eles.toggle ( true );\n      eles.toggle ( true );\n\n      t.true ( isShown ( eles ) );\n\n    });\n\n    it ( 'supports hiding', function ( t ) {\n\n      var eles = $('.shown');\n\n      eles.toggle ();\n\n      t.true ( isHidden ( eles ) );\n\n    });\n\n    it ( 'supports force hiding', function ( t ) {\n\n      var eles = $('.shown');\n\n      eles.toggle ( false );\n      eles.toggle ( false );\n\n      t.true ( isHidden ( eles ) );\n\n    });\n\n    it ( 'supports collections containing non-elements objects', function ( t ) {\n\n      var eles = $('.shown');\n\n      eles.toggle ().toggle ().toggle ().toggle ();\n\n      t.pass ();\n\n    });\n\n    it ( 'supports showing after hiding multiple times', function ( t ) {\n\n      var eles = $('.show-custom-style');\n\n      eles.toggle ( false );\n      eles.toggle ( false );\n      eles.toggle ( true );\n\n      t.true ( isDisplay ( eles, 'flex' ) );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/events.js",
    "content": "\nvar fixture = '\\\n  <div class=\"parent\">\\\n    <div class=\"event\">\\\n      <div class=\"child\">\\\n        <div class=\"grandchild\"></div>\\\n      </div>\\\n    </div>\\\n    <input class=\"input\" />\\\n    <div class=\"event-focus\" tabindex=\"-1\">\\\n      <div class=\"event-focus-child\" tabindex=\"-1\"></div>\\\n    </div>\\\n  </div>\\\n';\n\ndescribe ( 'Events', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.on', function ( it ) {\n\n    it ( 'attaches a single event', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n      var that;\n\n      function handler () {\n        count++;\n        that = this;\n      }\n\n      ele.on ( 'click', handler );\n      ele.trigger ( 'click' ).trigger ( 'click' );\n\n      t.is ( count, 2 );\n      t.is ( that, ele[0] );\n\n    });\n\n    it ( 'attaches multiple events', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo bar', handler );\n      ele.trigger ( 'foo' ).trigger ( 'bar' );\n\n      t.is ( count, 2 );\n\n    });\n\n    it ( 'attaches multiple events via a map', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ({\n        foo: handler,\n        bar: handler\n      });\n\n      ele.trigger ( 'foo' ).trigger ( 'bar' );\n\n      t.is ( count, 2 );\n\n    });\n\n    it ( 'stops propagation if false is returned', function ( t ) {\n\n      var ele = $('.event');\n      var parent = $('.parent');\n      var count = 0;\n\n      function handler () {\n        count++;\n        return false;\n      }\n\n      parent.on ( 'foo', handler );\n      parent.on ( 'foo', handler );\n      ele.on ( 'foo', handler );\n      ele.on ( 'foo', handler ); // We are not using `stopImmediatePropagation`\n      ele.trigger ( 'foo' );\n\n      t.is ( count, 2 );\n\n    });\n\n    describe ( 'supports events that do not bubble', function ( it ) { // If the document isn't focused the element won't get the focus either\n\n      if ( !document.hasFocus () ) return; // If the document isn't focused the element won't get the focus either\n\n      var events = ['focus.namespace', 'focus', 'blur', 'focusin', 'focusout', 'mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'focus', 'blur', 'mouseenter', 'mouseleave'];\n      var eventsTrigger = ['focus.namespace', 'focus', 'blur', 'focusin', 'focusout', 'mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'focusin', 'focusout', 'mouseover', 'mouseout'];\n      var counts = [[1, 1, 3, 3, 2, 2, 0], [1, 1, 3, 3, 2, 2, 0], [1, 1, 3, 3, 2, 2, 0], [2, 2, 5, 5, 5, 5, 0], [2, 2, 5, 5, 5, 5, 0], [2, 2, 5, 5, 5, 5, 0], [2, 2, 5, 5, 5, 5, 0], [2, 2, 5, 5, 5, 5, 0], [2, 2, 5, 5, 5, 5, 0], [0, 0, 2, 2, 2, 2, 0], [0, 0, 2, 2, 2, 2, 0], [2, 2, 5, 5, 5, 5, 0], [2, 2, 5, 5, 5, 5, 0]];\n\n      events.forEach ( function ( event, index ) {\n\n        it ( '[' + event + ' -> ' + eventsTrigger[index] + ']', function ( t ) {\n\n          var doc = $(document);\n          var ele = $('.event-focus');\n          var parent = $('.parent');\n          var child = $('.event-focus-child');\n          var count = 0;\n          var eventTrigger = eventsTrigger[index];\n\n          function handler () {\n            count++;\n          }\n\n          function check ( countIndex ) {\n            t.is ( count, counts[index][countIndex] );\n            count = 0;\n          }\n\n          doc.on ( event, handler );\n          doc.on ( event, '.event-focus', handler );\n          parent.on ( event, handler );\n          parent.on ( event, '.event-focus', handler );\n          ele.on ( event, handler );\n\n          parent.trigger ( eventTrigger );\n          check ( 0 );\n          parent.trigger ( eventTrigger );\n          check ( 1 );\n          ele.trigger ( eventTrigger );\n          check ( 2 );\n          ele.trigger ( eventTrigger );\n          check ( 3 );\n          child.trigger ( eventTrigger );\n          check ( 4 );\n          child.trigger ( eventTrigger );\n          check ( 5 );\n\n          doc.off ( event, handler );\n          doc.off ( event, '.event-focus', handler );\n          parent.off ( event, handler );\n          parent.off ( event, '.event-focus', handler );\n          ele.off ( event, handler );\n\n          parent.trigger ( eventTrigger );\n          parent.trigger ( eventTrigger );\n          ele.trigger ( eventTrigger );\n          ele.trigger ( eventTrigger );\n          child.trigger ( eventTrigger );\n          child.trigger ( eventTrigger );\n\n          check ( 6 );\n\n        });\n\n      });\n\n    });\n\n    it ( 'calls native event triggerers directly', function ( t ) {\n\n      var ele = $('.event-focus');\n      var count = 0;\n\n      ele[0].focus = function () {\n        count++;\n      };\n\n      ele.trigger ( 'focus' );\n\n      t.is ( count, 1 );\n\n      ele[0].blur = function () {\n        count++;\n      };\n\n      ele.trigger ( 'blur' );\n\n      t.is ( count, 2 );\n\n    });\n\n    ( document.hasFocus () ? it : it.skip )( 'listens to native focus/blur', function ( t ) { // If the document isn't focused the element won't get the focus either\n\n      var events = ['focus', 'blur'];\n\n      events.forEach ( function ( event ) {\n\n        var input = $('.input');\n        var count = 0;\n\n        function handler () {\n          count++;\n        }\n\n        input.on ( event, handler );\n        input[0][event] ();\n\n        t.is ( count, 1 );\n\n      });\n\n    });\n\n    it ( 'supports namespaces', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo bar.ns1', handler );\n      ele.on ( 'foo.ns1.ns2', handler );\n      ele.trigger ( 'foo.ns1.ns2' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' );\n\n      t.is ( count, 3 );\n\n    });\n\n    it ( 'supports event delegation', function ( t ) {\n\n      var ele = $('.event');\n      var parent = $('.parent');\n      var grandchild = $('.grandchild');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      parent.on ( 'click', '.event', handler );\n      ele.trigger ( 'click' );\n      grandchild.trigger ( 'click' );\n\n      t.is ( count, 2 );\n\n      parent.off ( 'click', handler );\n      ele.trigger ( 'click' );\n\n      t.is ( count, 2 );\n\n    });\n\n    it ( 'supports a data argument', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n      var datas = [];\n\n      function handler ( event ) {\n        count++;\n        datas.push ( event.data );\n      }\n\n      var values = [123, 'string', { obj: true }, 0, ''];\n\n      values.forEach ( function ( value ) {\n\n        ele.on ( 'foo', value, handler ); // Simple + Naive\n        ele.on ( 'foo', undefined,  value, handler ); // Simple\n        ele.on ( 'foo', '.event',  value, handler ); // Event delegation (Matching)\n        ele.on ( 'foo', '.eventz',  value, handler ); // Event delegation (Not Matching)\n        ele.on ( { foo: handler }, value ); // Map Simple + Naive\n        ele.on ( { foo: handler }, null, value ); // Map Simple\n        ele.on ( { foo: handler }, '.event', value ); // Map + Event delegation (Matching)\n        ele.on ( { foo: handler }, '.evenz', value ); // Map + Event delegation (Not Matching)\n\n      });\n\n      ele.trigger ( 'foo' );\n\n      t.is ( count, 28 );\n      t.deepEqual ( datas, [123, 123, 123, 123, 123, 123, 'string', 'string', 'string', 'string', { obj: true }, { obj: true }, { obj: true }, { obj: true }, { obj: true }, { obj: true }, 0, 0, 0, 0, 0, 0, undefined, '', '', undefined, '', ''] );\n\n    });\n\n    it ( 'supports Window and Document objects', function ( t ) {\n\n      var eles = $([window, document]);\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      eles.on ( 'foo', handler );\n      eles.trigger ( 'foo' );\n\n      t.is ( count, 3 );\n\n    });\n\n    it ( 'ignores the order of namespaces', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n      var namespaces = [];\n\n      function handler ( event ) {\n        count++;\n        namespaces.push ( event.namespace );\n      }\n\n      ele.on ( 'foo.ns1.ns2', handler ).on ( 'foo.ns2.ns1', handler );\n\n      ele.trigger ( 'foo.ns1.ns2' );\n      ele.trigger ( 'foo.ns2.ns1' );\n\n      ele.off ( 'foo.ns1.ns2' ).trigger ( 'foo.ns1.ns2' );\n\n      t.is ( count, 4 );\n      t.deepEqual ( namespaces, ['ns1.ns2', 'ns1.ns2', 'ns1.ns2', 'ns1.ns2'] );\n\n    });\n\n    it ( 'ignores namespaces-only events', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( '.ns1.ns2', handler );\n      ele.trigger ( '.ns1.ns2' );\n\n      t.is ( count, 0 );\n\n    });\n\n    it ( 'ignores non-elements objects in the collections', function ( t ) {\n\n      var ele = $(document.createTextNode ( '.css' ));\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo', handler );\n      ele.trigger ( 'foo' );\n\n      t.is ( count, 0 );\n\n    });\n\n    it ( 'overwrites event.currentTarget when using event delegation', function ( t ) {\n\n      var ele = $('.event');\n      var parent = $('.parent');\n      var html = $('html');\n      var count = 0;\n      var currentTargets = [];\n\n      function handler ( event ) {\n        count++;\n        event.bubbles; // Ensuring the event object hasn't been corrupted\n        currentTargets.push ( event.currentTarget );\n      }\n\n      ele.on ( 'click', handler );\n      parent.on ( 'click', '.event', handler );\n      html.on ( 'click', handler );\n      ele.trigger ( 'click' );\n\n      t.is ( count, 3 );\n      t.deepEqual ( currentTargets, [ele[0], ele[0], html[0]] );\n\n    });\n\n    it ( 'overwrites event.delegateTarget when using event delegation', function ( t ) {\n\n      var ele = $('.event');\n      var parent = $('.parent');\n      var html = $('html');\n      var count = 0;\n      var delegateTargets = [];\n\n      function handler ( event ) {\n        count++;\n        event.bubbles; // Ensuring the event object hasn't been corrupted\n        delegateTargets.push ( event.delegateTarget );\n      }\n\n      ele.on ( 'click', handler );\n      parent.on ( 'click', '.event', handler );\n      html.on ( 'click', handler );\n      ele.trigger ( 'click' );\n\n      t.is ( count, 3 );\n      t.deepEqual ( delegateTargets, [ele[0], parent[0], html[0]] );\n\n    });\n\n    it.skip ( 'stops propagation if false is returned when using event delegation', function ( t ) { //URL: https://github.com/kenwheeler/cash/issues/235\n\n      var ele = $('.event');\n      var parent = $('.parent');\n      var child = $('.child');\n      var count = 0;\n      var currentTargets = [];\n\n      function handler ( event ) {\n        count++;\n        currentTargets.push ( event.currentTarget );\n        return false;\n      }\n\n      parent.on ( 'foo', handler );\n      parent.on ( 'foo', handler );\n      parent.on ( 'foo', '.event', handler );\n      parent.on ( 'foo', '.event', handler );\n      parent.on ( 'foo', '.child', handler );\n      parent.on ( 'foo', '.child', handler );\n\n      parent.trigger ( 'foo' );\n\n      t.is ( count, 2 );\n      t.deepEqual ( currentTargets.slice ( 0 ), [parent[0], parent[0]] );\n\n      ele.trigger ( 'foo' );\n\n      t.is ( count, 4 );\n      t.deepEqual ( currentTargets.slice ( 2 ), [ele[0], ele[0]] );\n\n      child.trigger ( 'foo' );\n\n      t.is ( count, 6 );\n      t.deepEqual ( currentTargets.slice ( 4 ), [child[0], child[0]] );\n\n    });\n\n    it ( 'doesn\\'t throw an error when receiving a falsy callback', function ( t ) {\n\n      var ele = $('.event');\n\n      ele.on ( 'click', 0 );\n      ele.on ( 'click', '' );\n      ele.on ( 'click', undefined );\n      ele.on ( 'click', null );\n\n      t.pass ();\n\n    });\n\n    it.skip ( 'doesn\\'t have prototype inheritance issues', function ( t ) {\n\n      var ele = $('.event');\n\n      ele.on ( 'valueOf', function () {} );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.one', function ( it ) {\n\n    it ( 'removes the handler after the first call', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      var handler = function () {\n        count++;\n      };\n\n      ele.one ( 'click', handler );\n      ele.trigger ( 'click' ).trigger ( 'click' );\n\n      t.is ( count, 1 );\n\n      ele.one ( 'click', handler ).off ( 'click', handler ).trigger ( 'click' );\n\n      t.is ( count, 1 );\n\n    });\n\n  });\n\n  describe ( '$.fn.off', function ( it ) {\n\n    it ( 'removes a single event', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'click', handler );\n      ele.trigger ( 'click' );\n      ele.off ( 'click' );\n      ele.trigger ( 'click' );\n\n      t.is ( count, 1 );\n\n    });\n\n    it ( 'removes multiple events', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo bar baz', handler );\n      ele.off ( 'foo bar', handler );\n      ele.trigger ( 'foo' ).trigger ( 'bar' ).trigger ( 'baz' );\n\n      t.is ( count, 1 );\n\n    });\n\n    it ( 'removes multiple events via a map', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      var events = {\n        foo: handler,\n        bar: handler\n      };\n\n      ele.on ( events ).off ( events );\n      ele.trigger ( 'foo' ).trigger ( 'bar' );\n\n      t.is ( count, 0 );\n\n    });\n\n    it ( 'removes namespaced events, preserving regular ones', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo foo.ns1', handler ).off ( '.ns1' ).trigger ( 'foo' ).off ( 'foo' ).trigger ( 'foo' );\n\n      t.is ( count, 1 );\n\n    });\n\n    it ( 'removes all events', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo bar', handler );\n      ele.off ();\n      ele.trigger ( 'foo' ).trigger ( 'bar' );\n\n      t.is ( count, 0 );\n\n    });\n\n    it ( 'supports namespaces', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo.ns1.ns2', handler ).off ( 'foo' ).trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns3' );\n\n      t.is ( count, 0 );\n\n      ele.on ( 'foo.ns1.ns2', handler ).off ( 'foo.ns1' ).trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns3' );\n\n      t.is ( count, 0 );\n\n      ele.on ( 'foo.ns1.ns2', handler ).off ( 'foo.ns2' ).trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns3' );\n\n      t.is ( count, 0 );\n\n      ele.on ( 'foo.ns1.ns2', handler ).off ( 'foo.ns1.ns2' ).trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns3' );\n\n      t.is ( count, 0 );\n\n      ele.on ( 'foo.ns1.ns2 bar.ns1.ns2 baz.ns1.ns2', handler ).off ( '.ns1' ).trigger ( 'foo' ).trigger ( 'bar' ).trigger ( 'baz' );\n\n      t.is ( count, 0 );\n\n      ele.on ( 'foo.ns1.ns2', handler ).off ( 'foo.ns3' ).trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns3' );\n\n      t.is ( count, 3 );\n\n    });\n\n    it ( 'supports event delegation', function ( t ) {\n\n      var ele = $('.event');\n      var parent = $('.parent');\n      var countChild = 0;\n      var countDelegate = 0;\n\n      function handlerChild () {\n        countChild++;\n      }\n\n      function handlerDelegate () {\n        countDelegate++;\n      }\n\n      ele.on ( 'click', handlerChild );\n      parent.on ( 'click', '.event', handlerDelegate );\n      parent.off ( 'click', '.event', handlerDelegate );\n      ele.trigger ( 'click' );\n\n      t.is ( countChild, 1 );\n      t.is ( countDelegate, 0 );\n\n    });\n\n    it ( 'doesn\\'t throw an error when receiving a falsy callback', function ( t ) {\n\n      var ele = $('.event');\n\n      ele.off ( 'click', 0 );\n      ele.off ( 'click', '' );\n      ele.off ( 'click', undefined );\n      ele.off ( 'click', null );\n\n      t.pass ();\n\n    });\n\n    it.skip ( 'doesn\\'t have prototype inheritance issues', function ( t ) {\n\n      var ele = $('.event');\n\n      ele.off ( 'valueOf', function () {} );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.ready', function () {\n\n    QUnit.test ( 'calls the callback if the DOM is already ready', function ( assert ) { // For some reason we can't use our nice helpers for async assertions :(\n\n      Object.defineProperty ( document, 'readyState', {\n        configurable: true,\n        value: 'complete'\n      });\n\n      var done = assert.async ();\n      var count = 0;\n      var arg;\n\n      var handler = function ( $ ) {\n        count++;\n        arg = $;\n      };\n\n      $(handler);\n\n      assert.is ( count, 0 ); // Ensuring it's called asynchronously\n\n      setTimeout ( function () {\n        assert.is ( count, 1 );\n        assert.is ( arg, $ );\n        done ();\n      }, 100 );\n\n    });\n\n    QUnit.test ( 'calls the callback if the DOM is not ready already', function ( assert ) { // For some reason we can't use our nice helpers for async assertions :(\n\n      Object.defineProperty ( document, 'readyState', {\n        configurable: true,\n        value: 'loading'\n      });\n\n      var done = assert.async ();\n      var count = 0;\n      var arg;\n\n      var handler = function ( $ ) {\n        count++;\n        arg = $;\n      };\n\n      $(handler);\n\n      assert.is ( count, 0 ); // Ensuring it's called asynchronously\n\n      $(document).trigger ( 'DOMContentLoaded' );\n\n      setTimeout ( function () {\n        assert.is ( count, 1 );\n        assert.is ( arg, $ );\n        done ();\n      }, 100 );\n\n    });\n\n    QUnit.test ( 'exceptions are propagated', function ( assert ) { // For some reason we can't use our nice helpers for async assertions :(\n\n      assert.expect ( 2 );\n\n      var done = assert.async ();\n\n      window.onerror = function ( err ) {\n        assert.ok ( err );\n      };\n\n      var handler = function () {\n        throw new Error ( 'Ready exception...' );\n      };\n\n      $(handler);\n      $(document).trigger ( 'DOMContentLoaded' );\n\n      setTimeout ( function () {\n        assert.is ( true, true );\n        done ();\n      }, 100 );\n\n    });\n\n  });\n\n  describe ( '$.fn.trigger', function ( it ) {\n\n    it ( 'triggers single event', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'click', handler );\n      ele.trigger ( 'click' );\n\n      t.is ( count, 1 );\n\n    });\n\n    ( document.hasFocus () ? it : it.skip )( 'triggers focus/blur natively', function ( t ) { // If the document isn't focused the element won't get the focus either\n\n      var events = ['focus', 'blur'];\n\n      events.forEach ( function ( event ) {\n\n        var ele = $('.event-focus');\n        var count = 0;\n\n        function handler () {\n          count++;\n        }\n\n        var nativeHandler = ele[0][event];\n        ele[0][event] = function () {\n          handler ();\n          nativeHandler.apply ( this, arguments );\n        };\n\n        ele.trigger ( event );\n\n        t.is ( count, 1 );\n\n      });\n\n    });\n\n    it ( 'can pass data to the handler', function ( t ) {\n\n      var ele = $('.event');\n      var count;\n      var data;\n\n      function handler ( event, d ) {\n        count++;\n        data = d;\n      }\n\n      var values = [123, 'string', { obj: true }, 0, ''];\n\n      values.forEach ( function ( value ) {\n\n        count = 0;\n\n        ele.on ( 'custom', handler );\n        ele.trigger ( 'custom', value );\n        ele.off ( 'custom', handler );\n\n        t.is ( count, 1 );\n        t.is ( data, value );\n\n      });\n\n    });\n\n    it ( 'can pass namespaces to the handler', function ( t ) {\n\n      var ele = $('.event');\n      var namespaces = [];\n\n      function handler ( event ) {\n        namespaces.push ( event.namespace );\n      }\n\n      ele.on ( 'foo.ns1.ns2', handler );\n      ele.trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns1.ns2' );\n\n      t.deepEqual ( namespaces, ['', 'ns1', 'ns2', 'ns1.ns2'] );\n\n    });\n\n    it ( 'supports namespaces', function ( t ) {\n\n      var ele = $('.event');\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      ele.on ( 'foo.ns1.ns2', handler ).trigger ( 'foo' ).trigger ( 'foo.ns1' ).trigger ( 'foo.ns2' ).trigger ( 'foo.ns3' ).trigger ( 'foo.ns1.ns3' );\n\n      t.is ( count, 3 );\n\n    });\n\n    it.skip ( 'doesn\\'t have prototype inheritance issues', function ( t ) {\n\n      var ele = $('.event');\n\n      ele.trigger ( 'valueOf' );\n\n      t.pass ();\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/forms.js",
    "content": "\nvar fixture = '\\\n  <form class=\"form\">\\\n    <input type=\"hidden\" value=\"5\" name=\"hidden\"/>\\\n    <input type=\"text\" value=\"text with spaces\" name=\"text\"/>\\\n    <input type=\"text\" value=\"disabled\" name=\"disabled-check\" disabled />\\\n    <input type=\"checkbox\" value=\"yes\" checked=\"checked\" name=\"checkbox-yes\" />\\\n    <input type=\"checkbox\" value=\"no\" name=\"checkbox-no\" />\\\n    <input type=\"checkbox\" value=\"1\" name=\"checkbox-multi\" />\\\n    <input type=\"checkbox\" value=\"2\" name=\"checkbox-multi\" />\\\n    <input type=\"radio\" value=\"yes\" checked=\"checked\" name=\"radio\" />\\\n    <input type=\"radio\" value=\"no\" name=\"radio\" />\\\n    <select name=\"select\">\\\n      <option value=\"not-selected\">Not Selected</option>\\\n      <option value=\"selected\" selected>Selected</option>\\\n    </select>\\\n    <select name=\"select-multiple\" multiple>\\\n      <option value=\"option-1\" selected>Selected</option>\\\n      <option value=\"option-2\" selected>Selected</option>\\\n    </select>\\\n    <input type=\"file\" name=\"file\" />\\\n    <input type=\"file\" name=\"file-multiple\" multiple />\\\n    <input type=\"submit\" value=\"submit\" name=\"submit\" />\\\n  </form>\\\n';\n\ndescribe ( 'Forms', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.serialize', function ( it ) {\n\n    it ( 'serializes a form', function ( t ) {\n\n      var val = $('.form').serialize ();\n\n      t.is ( val, 'hidden=5&text=text%20with%20spaces&checkbox-yes=yes&radio=yes&select=selected&select-multiple=option-1&select-multiple=option-2' );\n\n    });\n\n    it ( 'serializes an element', function ( t ) {\n\n      var val = $('.form input[type=text]').serialize ();\n\n      t.is ( val, 'text=text%20with%20spaces' );\n\n    });\n\n    it ( 'serializes multiple form elements', function ( t ) {\n\n      var val = $('.form input, .form textarea, .form select').serialize ();\n\n      t.is ( val, 'hidden=5&text=text%20with%20spaces&checkbox-yes=yes&radio=yes&select=selected&select-multiple=option-1&select-multiple=option-2' );\n\n    });\n\n    it ( 'normalizes newlines', function ( t ) {\n\n      const ele = $('<textarea name=\"T3\" rows=\"2\" cols=\"15\">?\\nZ</textarea>');\n\n      t.is ( ele.serialize (), 'T3=%3F%0D%0AZ' );\n\n    });\n\n  });\n\n  describe ( '$.fn.val', function ( it ) {\n\n    it ( 'gets the value of input', function ( t ) {\n\n      var val = $('.form input[type=text]').val ();\n\n      t.is ( val, 'text with spaces' );\n\n    });\n\n    it ( 'gets the value of input file multiple', function ( t ) {\n\n      var val = $('.form input[type=file][multiple]').val ();\n\n      t.is ( val, '' );\n\n    });\n\n    it ( 'gets the value of select', function ( t ) {\n\n      var val = $('select[name=select]').val ();\n\n      t.is ( val, 'selected' );\n\n    });\n\n    it ( 'gets the value of select multiple', function ( t ) {\n\n      var val = $('select[name=select-multiple]').val ();\n\n      t.deepEqual ( val, ['option-1', 'option-2'] );\n\n    });\n\n    it ( 'sets the value of input', function ( t ) {\n\n      $('.form input[type=text]').val ( 0 );\n\n      var val = $('.form input[type=text]').val ();\n\n      t.is ( val, '0' );\n\n    });\n\n    it ( 'sets the value of select', function ( t ) {\n\n      $('select[name=select]').val ( 'not-selected' );\n\n      var val = $('select[name=select]').val ();\n\n      t.is ( val, 'not-selected' );\n\n    });\n\n    it ( 'sets the value of select multiple', function ( t ) {\n\n      $('select[name=select-multiple]').val ([ 'option-1' ]);\n\n      var val = $('select[name=select-multiple]').val ();\n\n      t.deepEqual ( val, ['option-1'] );\n\n      $('select[name=select-multiple]').val ([ 'option-1', 'option-2' ]);\n\n      var val = $('select[name=select-multiple]').val ();\n\n      t.deepEqual ( val, ['option-1', 'option-2'] );\n\n    });\n\n    it ( 'sets the value of checkboxes', function ( t ) {\n\n      var eles = $('input[name=\"checkbox-multi\"]');\n\n      eles.val ( 2 );\n\n      t.is ( eles.serialize (), 'checkbox-multi=2' );\n\n      eles.val ([ 1, '2' ]);\n\n      t.is ( eles.serialize (), 'checkbox-multi=1&checkbox-multi=2' );\n\n    });\n\n    it ( 'sets the value of radios', function ( t ) {\n\n      var eles = $('input[name=\"radio\"]');\n\n      eles.val ( 'yes' );\n\n      t.is ( eles.serialize (), 'radio=yes' );\n\n      eles.val ([ 'yes', 'no' ]);\n\n      t.is ( eles.serialize (), 'radio=no' );\n\n    });\n\n    it ( 'supports setting the value of input to null', function ( t ) {\n\n      $('.form input[type=text]').val ( null );\n\n      var val = $('.form input[type=text]').val ();\n\n      t.is ( val, '' );\n\n    });\n\n    it ( 'supports setting the value of select to null', function ( t ) {\n\n      $('select[name=select]').val ( null );\n\n      var val = $('select[name=select]').val ();\n\n      t.true ( val === '' || val === 'selected' ); // This seems a bit browser-dependant, some set it to '', some auto-select the latest selected option instead\n\n    });\n\n    it ( 'supports setting the value of select multiple to null', function ( t ) {\n\n      $('select[name=select-multiple]').val ( null );\n\n      var val = $('select[name=select-multiple]').val ();\n\n      t.deepEqual ( val, [] );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/manipulation.js",
    "content": "\nvar fixture = '\\\n  <div class=\"parent\">\\\n    <div class=\"anchor\">content</div>\\\n  </div>\\\n  <div class=\"uncle\"></div>\\\n  <div class=\"aunt\">\\\n    <div class=\"cousin\">content</div>\\\n  </div>\\\n';\n\nvar ele2tagname = function ( ele ) { return ele.tagName; };\n\ndescribe ( 'Manipulation', { beforeEach: getFixtureInit ( fixture ) }, function ( it ) {\n\n  QUnit.test ( 'inserted script tags get executed', function ( assert ) { // For some reason we can't use our nice helpers for async assertions :(\n\n    var sync = [\n      ['<script>if ( window.__script_test__ === 1 ) throw new Error (); window.__script_test__ = 1</script>', '__script_test__', 1],\n      ['<script type=\"\">if ( window.__script_test__ === 2 ) throw new Error (); window.__script_test__ = 2</script>', '__script_test__', 2],\n      ['<script type=\"text/javascript\">if ( window.__script_test__ === 3 ) throw new Error (); window.__script_test__ = 3</script>', '__script_test__', 3],\n      ['<script type=\"text/ecmascript\">if ( window.__script_test__ === 4 ) throw new Error (); window.__script_test__ = 4</script>', '__script_test__', 4],\n      ['<script type=\"text/custom\">if ( window.__script_test__ === 5 ) throw new Error (); window.__script_test__ = 5</script>', '__script_test__', 4],\n      ['<div class=\"nested\"><script>if ( window.__script_test__ === 5 ) throw new Error (); window.__script_test__ = 5</script></div>', '__script_test__', 5],\n      ['<script><![CDATA[if ( window.__script_test__ === 6 ) throw new Error (); window.__script_test__ = 6</script>', '__script_test__', 6]\n    ];\n\n    sync.forEach ( function ( test ) {\n\n      $(test[0]).appendTo ( '.anchor' );\n\n      assert.is ( window[test[1]], test[2] );\n\n    });\n\n    var async = [\n      ['<script type=\"text/javascript\" src=\"data:text/javascript,if ( window.__script_test_async2__ === 2 ) throw new Error (); window.__script_test_async2__ = 2\"></script>', '__script_test_async2__', 2],\n      ['<script type=\"module\">if ( window.__script_test_async1__ === 1 ) throw new Error (); window.__script_test_async1__ = 1</script>', '__script_test_async1__', 1]\n    ];\n\n    if ( !/(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i.test ( navigator.userAgent ) && !/(macintosh|mac(?=_powerpc)\\s)/i.test ( navigator.userAgent ) ) return; //FIXME: For some reason some browsers don't support some of these, and I don't think its our fault\n\n    async.forEach ( function ( test ) {\n\n      var done = assert.async ();\n\n      $(test[0]).appendTo ( '.anchor' );\n\n      setTimeout ( function () {\n        assert.is ( window[test[1]], test[2] );\n        done ();\n      }, 100 );\n\n    });\n\n  });\n\n  describe ( '$.fn.after', function ( it ) {\n\n    it ( 'inserts a selector after', function ( t ) {\n\n      $('.anchor').after ( '<a></a><b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 0 );\n      t.is ( next.length, 3 );\n      t.deepEqual ( $('.parent').children ().slice ( 1 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'inserts multiple selectors after', function ( t ) {\n\n      $('.anchor').after ( '<a></a>', '<b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 0 );\n      t.is ( next.length, 3 );\n      t.deepEqual ( $('.parent').children ().slice ( 1 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'supports non-element nodes', function ( t ) {\n\n      var ele = $('<div><span> dear</span>world</div>');\n\n      ele.find ( 'span' ).after ( '<span>hello, </span>' );\n\n      t.is ( ele.html (), '<span> dear</span><span>hello, </span>world' );\n\n    });\n\n  });\n\n  describe ( '$.fn.append', function ( it ) {\n\n    it ( 'appends a selector', function ( t ) {\n\n      $('.parent').append ( '<a></a><b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 0 );\n      t.is ( next.length, 3 );\n      t.deepEqual ( $('.parent').children ().slice ( 1 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'appends multiple selectors', function ( t ) {\n\n      $('.parent').append ( '<a></a>', '<b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 0 );\n      t.is ( next.length, 3 );\n      t.deepEqual ( $('.parent').children ().slice ( 1 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'supports non-element nodes', function ( t ) {\n\n      var ele = $('<div>world</div>');\n\n      ele.append ( '<span>hello, </span>' );\n\n      t.is ( ele.html (), 'world<span>hello, </span>' );\n\n    });\n\n    it ( 'doesn\\'t throw with undefined', function ( t ) {\n\n      $('.anchor').append ( undefined );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.appendTo', function ( it ) {\n\n    it ( 'appends this to a selector', function ( t ) {\n\n      $( '<a></a><b></b><c></c>' ).appendTo ( '.parent' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 0 );\n      t.is ( next.length, 3 );\n      t.deepEqual ( $('.parent').children ().slice ( 1 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n  });\n\n  describe ( '$.fn.before', function ( it ) {\n\n    it ( 'inserts a selector before', function ( t ) {\n\n      $('.anchor').before ( '<a></a><b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 3 );\n      t.is ( next.length, 0 );\n      t.deepEqual ( $('.parent').children ().slice ( 0, 3 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'inserts multiple selectors after', function ( t ) {\n\n      $('.anchor').before ( '<a></a>', '<b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 3 );\n      t.is ( next.length, 0 );\n      t.deepEqual ( $('.parent').children ().slice ( 0, 3 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'supports non-element nodes', function ( t ) {\n\n      var ele = $('<div>world<span> dear</span></div>');\n\n      ele.find ( 'span' ).before ( '<span>hello, </span>' );\n\n      t.is ( ele.html (), 'world<span>hello, </span><span> dear</span>' );\n\n    });\n\n  });\n\n  describe ( '$.fn.clone', function ( it ) {\n\n    it ( 'clones all elements', function ( t ) {\n\n      var original = $('#qunit-fixture *');\n      var cloned = original.clone ();\n\n      t.is ( original.length, cloned.length );\n      t.not ( original[0], cloned[0] );\n      t.is ( original[0].className, cloned[0].className );\n\n    });\n\n  });\n\n  describe ( '$.fn.detach', function ( it ) {\n\n    it ( 'detaches all elements and preserves their event handlers', function ( t ) {\n\n      var count = 0;\n      var anchor = $('.anchor');\n\n      function handler () {\n        count++;\n      }\n\n      anchor.on ( 'foo', handler );\n      anchor.detach ();\n      anchor.appendTo ( '.parent' );\n      anchor.trigger ( 'foo' );\n      anchor.detach ();\n      anchor.trigger ( 'foo' );\n\n      t.is ( $('.anchor').length, 0 );\n      t.is ( count, 2 );\n\n    });\n\n    it ( 'supports an optional selector', function ( t ) {\n\n      var eles = $('.parent').parent ().children ();\n\n      eles.detach ( '.aunt' );\n\n      t.is ( $('.parent').parent ().children ().length, 2 );\n      t.is ( $('.aunt').length, 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.empty', function ( it ) {\n\n    it ( 'empties all elements', function ( t ) {\n\n      var parent = $('.parent');\n\n      parent.empty ();\n\n      t.is ( parent.contents ().length, 0 );\n\n    });\n\n    it ( 'supports multiple elements in the collection', function ( t ) {\n\n      var parent = $('.parent');\n      var aunt = $('.aunt');\n      var parents = parent.add ( aunt );\n\n      parents.empty ();\n\n      t.is ( parent.contents ().length, 0 );\n      t.is ( aunt.contents ().length, 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.html', function ( it ) {\n\n    it ( 'gets the html', function ( t ) {\n\n      var parent = $('.parent');\n\n      t.is ( parent.html ().trim (), '<div class=\"anchor\">content</div>' );\n\n    });\n\n    it ( 'sets html strings', function ( t ) {\n\n      var anchor = $('.anchor');\n      var html = '<div class=\"foo\"></div>';\n\n      anchor.html ( html );\n\n      t.is ( anchor.html (), html );\n      t.is ( $('.foo').length, 1 );\n\n    });\n\n    it ( 'sets plain string', function ( t ) {\n\n      var anchor = $('.anchor');\n      var html = 'foo';\n\n      anchor.html ( html );\n\n      t.is ( anchor.html (), html );\n\n    });\n\n    it ( 'sets numbers', function ( t ) {\n\n      var anchor = $('.anchor');\n\n      anchor.html ( 0 );\n\n      t.is ( anchor.html (), '0' );\n\n    });\n\n    it ( 'sets script and get executed', function ( t ) {\n\n      var anchor = $('.anchor');\n      var html = '<script>window.__html_script_test__ = 1</script>';\n\n      anchor.html ( html );\n\n      t.is ( window.__html_script_test__, 1 );\n      t.is ( anchor.html (), html );\n\n    });\n\n    it ( 'ignores non-elements objects in the collections', function ( t ) {\n\n      var eles = $('<div id=\"nonnodes\"><span id=\"nonnodesElement\">hi</span> there <!-- mon ami --></div>');\n      var actual = [];\n      var expected = [];\n\n      eles.contents ().html ( '<b>bold</b>' ).each ( function ( i, ele ) {\n        var html = $(ele).html ();\n        expected.push ( this.nodeType === 1 ? '<b>bold</b>' : undefined );\n        actual.push ( html ? html.toLowerCase () : html );\n      });\n\n      t.deepEqual ( actual, expected );\n\n    });\n\n  });\n\n  describe ( '$.fn.insertAfter', function ( it ) {\n\n    it ( 'inserts this after a selector', function ( t ) {\n\n      $('<a></a><b></b><c></c>').insertAfter ( '.anchor' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 0 );\n      t.is ( next.length, 3 );\n      t.deepEqual ( $('.parent').children ().slice ( 1 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n  });\n\n  describe ( '$.fn.insertBefore', function ( it ) {\n\n    it ( 'inserts this before a selector', function ( t ) {\n\n      $('<a></a><b></b><c></c>').insertBefore ( '.anchor' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 3 );\n      t.is ( next.length, 0 );\n      t.deepEqual ( $('.parent').children ().slice ( 0, 3 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n  });\n\n  describe ( '$.fn.prepend', function ( it ) {\n\n    it ( 'prepends a selector', function ( t ) {\n\n      $('.parent').prepend ( '<a></a><b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 3 );\n      t.is ( next.length, 0 );\n      t.deepEqual ( $('.parent').children ().slice ( 0, 3 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'prepends multiple selectors', function ( t ) {\n\n      $('.parent').prepend ( '<a></a>', '<b></b><c></c>' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 3 );\n      t.is ( next.length, 0 );\n      t.deepEqual ( $('.parent').children ().slice ( 0, 3 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n    it ( 'supports non-element nodes', function ( t ) {\n\n      var ele = $('<div>world</div>');\n\n      ele.prepend ( '<span>hello, </span>' );\n\n      t.is ( ele.html (), '<span>hello, </span>world' );\n\n    });\n\n    it ( 'doesn\\'t throw with undefined', function ( t ) {\n\n      $('.anchor').prepend ( undefined );\n\n      t.pass ();\n\n    });\n\n  });\n\n  describe ( '$.fn.prependTo', function ( it ) {\n\n    it ( 'prepends this to a selector', function ( t ) {\n\n      $('<a></a><b></b><c></c>').prependTo ( '.parent' );\n\n      var prev = $('.anchor').prevAll ();\n      var next = $('.anchor').nextAll ();\n\n      t.is ( prev.length, 3 );\n      t.is ( next.length, 0 );\n      t.deepEqual ( $('.parent').children ().slice ( 0, 3 ).get ().map ( ele2tagname ), ['A', 'B', 'C'] );\n\n    });\n\n  });\n\n  describe ( '$.fn.remove', function ( it ) {\n\n    it ( 'detaches all elements and removes their event handlers', function ( t ) {\n\n      var count = 0;\n      var anchor = $('.anchor');\n\n      function handler () {\n        count++;\n      }\n\n      anchor.on ( 'foo', handler );\n      anchor.remove ();\n      anchor.prependTo ( '.form-fixture' );\n      anchor.trigger ( 'foo' );\n      anchor.remove ();\n      anchor.trigger ( 'foo' );\n\n      t.is ( $('.anchor').length, 0 );\n      t.is ( count, 0 );\n\n    });\n\n    it ( 'supports an optional selector', function ( t ) {\n\n      var eles = $('.parent').parent ().children ();\n\n      eles.remove ( '.aunt' );\n\n      t.is ( $('.parent').parent ().children ().length, 2 );\n      t.is ( $('.aunt').length, 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.replaceAll', function ( it ) {\n\n    it ( 'replaces a selector with this', function ( t ) {\n\n      var parent = $('.parent');\n      var html = '<p></p>';\n\n      $('<p>').replaceAll ( '.anchor' );\n\n      t.is ( parent.html ().trim (), html );\n      t.is ( $('.anchor').length, 0 );\n      t.is ( $('.parent p').length, 1 );\n\n    });\n\n    it ( 'supports multiple elements', function ( t ) {\n\n      var toReplace = $('.parent, .uncle, .aunt');\n      var html = '<p></p>';\n\n      $(html).replaceAll ( toReplace );\n\n      t.is ( $('#qunit-fixture p').length, 3 );\n\n    });\n\n  });\n\n  describe ( '$.fn.replaceWith', function ( it ) {\n\n    it ( 'replaces this with a selector', function ( t ) {\n\n      var parent = $('.parent');\n      var anchor = $('.anchor');\n      var html = '<p></p>';\n\n      anchor.replaceWith ( html );\n\n      t.is ( parent.html ().trim (), html );\n      t.is ( $('.anchor').length, 0 );\n      t.is ( $('.parent p').length, 1 );\n\n    });\n\n    it ( 'supports multiple elements', function ( t ) {\n\n      var toReplace = $('.parent, .uncle, .aunt');\n      var html = '<p></p>';\n\n      toReplace.replaceWith ( html );\n\n      t.is ( $('#qunit-fixture p').length, 3 );\n\n    });\n\n  });\n\n  describe ( '$.fn.text', function ( it ) {\n\n    it ( 'gets the text from a single child', function ( t ) {\n\n      var anchor = $('.anchor');\n\n      t.is ( anchor.text (), 'content' );\n\n    });\n\n    // it ( 'gets the text from a single child', function ( t ) {\n\n    //   var value = $('<p>1</p>\\n<p>2</p>').text ();\n\n    //   t.is ( value, '1\\n2 ' );\n\n    // });\n\n    it ( 'sets html strings', function ( t ) {\n\n      var anchor = $('.anchor');\n      var text = '<div>foo</div>';\n\n      anchor.text ( text );\n\n      t.is ( anchor.text (), text );\n\n    });\n\n    it ( 'sets plain strings', function ( t ) {\n\n      var anchor = $('.anchor');\n      var text = 'foo';\n\n      anchor.text ( text );\n\n      t.is ( anchor.text (), text );\n\n    });\n\n    it ( 'sets numbers', function ( t ) {\n\n      var anchor = $('.anchor');\n\n      anchor.text ( 0 );\n\n      t.is ( anchor.text (), '0' );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.text (), '' );\n\n    });\n\n  });\n\n  describe ( '$.fn.unwrap', function ( it ) {\n\n    it ( 'unwraps each element', function ( t ) {\n\n      var anchor = $('.anchor');\n\n      anchor.unwrap ();\n\n      t.is ( $('.parent').length, 0 );\n      t.deepEqual ( anchor.parent ().get (), $('#qunit-fixture').get () );\n\n    });\n\n    it ( 'doesn\\'t unwrap immediate children of the body', function ( t ) {\n\n      var ele = $('<div id=\"foo\" ></div>').appendTo ( document.body );\n\n      ele.unwrap ();\n\n      t.is ( $('#foo').length, 1 );\n\n      ele.remove ();\n\n    });\n\n  });\n\n  describe ( '$.fn.wrap', function ( it ) {\n\n    it ( 'wraps a structure around each element', function ( t ) {\n\n      var eles = $('.uncle, .aunt');\n      var wrapper = '<div class=\"wrapper\"></div>';\n\n      eles.wrap ( wrapper );\n\n      t.is ( eles.parent ().filter ( '.wrapper' ).length, 2 );\n\n    });\n\n    it ( 'supports nested structures', function ( t ) {\n\n      var eles = $('.uncle, .aunt');\n      var wrapper = '<div class=\"wrapper\"><div class=\"nested\"></div></div>';\n\n      eles.wrap ( wrapper );\n\n      t.is ( eles.parent ().filter ( '.nested' ).length, 2 );\n      t.is ( eles.parent ().parent ().filter ( '.wrapper' ).length, 2 );\n\n    });\n\n    it ( 'supports non-element nodes', function ( t ) {\n\n      var ele = $('<div id=\"nonnodes\"><span>hi</span> there <!-- mon ami --></div>');\n      var contents = ele.contents ();\n\n      contents.wrap ( '<i></i>' );\n\n      t.is ( ele.find ( 'i' ).length, 3 );\n      t.is ( ele.find ( 'i' ).text (), contents.text () );\n\n    });\n\n  });\n\n  describe ( '$.fn.wrapAll', function ( it ) {\n\n    it ( 'wraps a structure around all elements', function ( t ) {\n\n      var eles = $('.uncle, .aunt');\n      var wrapper = '<div class=\"wrapper\"></div>';\n\n      eles.wrapAll ( wrapper );\n\n      t.is ( eles.parent ().filter ( '.wrapper' ).length, 1 );\n\n    });\n\n    it ( 'supports nested structures', function ( t ) {\n\n      var eles = $('.uncle, .aunt');\n      var wrapper = '<div class=\"wrapper\"><div class=\"nested\"></div></div>';\n\n      eles.wrapAll ( wrapper );\n\n      t.is ( eles.parent ().filter ( '.nested' ).length, 1 );\n      t.is ( eles.parent ().parent ().filter ( '.wrapper' ).length, 1 );\n\n    });\n\n    it ( 'doesn\\'t clone elements', function ( t ) {\n\n      var ele = $('<div><a><b></b></a><a></a></div>');\n\n      ele.find ( 'a' ).wrapAll ( '<i>' );\n\n      t.is ( ele.html (), '<i><a><b></b></a><a></a></i>' );\n\n    });\n\n  });\n\n  describe ( '$.fn.wrapInner', function ( it ) {\n\n    it ( 'wraps a struncture around all contents', function ( t ) {\n\n      var eles = $('.anchor, .uncle');\n      var wrapper = '<div class=\"wrapper\"></div>';\n\n      eles.wrapInner ( wrapper );\n\n      t.is ( $( eles[0] ).html ().trim (), '<div class=\"wrapper\">content</div>' );\n      t.is ( $( eles[1] ).html (), '<div class=\"wrapper\"></div>' );\n\n    });\n\n    it ( 'supports nested structures', function ( t ) {\n\n      var eles = $('.anchor, .uncle');\n      var wrapper = '<div class=\"wrapper\"><div class=\"nested\"></div></div>';\n\n      eles.wrapInner ( wrapper );\n\n      t.is ( $( eles[0] ).html ().trim (), '<div class=\"wrapper\"><div class=\"nested\">content</div></div>' );\n      t.is ( $( eles[1] ).html (), '<div class=\"wrapper\"><div class=\"nested\"></div></div>' );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/offset.js",
    "content": "\nvar fixture = '\\\n  <div class=\"relative\" style=\"position: relative\">\\\n    <div class=\"fixed\" style=\"position: fixed; top: 200px; left: 100px;\"></div>\\\n    <div class=\"absolute\" style=\"position: absolute; top: 20px; left: 10px;\"></div>\\\n  </div>\\\n';\n\ndescribe ( 'Offset', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.offsetParent', function ( it ) {\n\n    it ( 'gets the offset parent', function ( t ) {\n\n      var relative = $('.relative');\n      var absolute = $('.absolute');\n\n      t.deepEqual ( absolute.offsetParent ().get (), relative.get () );\n\n    });\n\n  });\n\n  describe ( '$.fn.offset', function ( it ) {\n\n    it ( 'gets the offset', function ( t ) {\n\n      var fixed = $('.fixed');\n\n      t.deepEqual ( fixed.offset (), { top: 200, left: 100 } );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.offset (), undefined );\n\n    });\n\n  });\n\n  describe ( '$.fn.position', function ( it ) {\n\n    it ( 'gets the offset', function ( t ) {\n\n      var absolute = $('.absolute');\n\n      t.deepEqual ( absolute.position (), { top: 20, left: 10 } );\n\n    });\n\n    it ( 'supports empty collections', function ( t ) {\n\n      var ele = $();\n\n      t.is ( ele.position (), undefined );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/traversal.js",
    "content": "\nvar fixture = '\\\n  <div class=\"grandparent\">\\\n    <div class=\"parent\">\\\n      string\\\n      <!-- COMMENT -->\\\n      <div class=\"prevprev sibling\"></div>\\\n      <div class=\"prev sibling\"></div>\\\n      <div class=\"child sibling\"></div>\\\n      <div class=\"next sibling\"></div>\\\n      <div class=\"nextnext sibling\"></div>\\\n    </div>\\\n    <div class=\"uncle\"></div>\\\n    <div class=\"aunt\"></div>\\\n  </div>\\\n  <div class=\"dotsgrandparent\">\\\n    <div class=\"dotsparent\">\\\n      <div class=\"dots.first\"></div>\\\n      <div id=\"id.with.dots\" class=\"class.with.dots\"></div>\\\n    </div>\\\n  </div>\\\n  <iframe src=\"about:blank\"></iframe>\\\n';\n\ndescribe ( 'Traversal', { beforeEach: getFixtureInit ( fixture ) }, function () {\n\n  describe ( '$.fn.children', function ( it ) {\n\n    it ( 'gets the children', function ( t ) {\n\n      var children = $('.parent').children ();\n\n      t.is ( children.length, 5 );\n\n    });\n\n    it ( 'supports filtering by a selector', function ( t ) {\n\n      var children = $('.parent').children ( '.prev, .next' );\n\n      t.is ( children.length, 2 );\n\n    });\n\n    it ( 'supports filtering by a class with dots', function ( t ) {\n\n      var children = $('.dotsparent').children ( '.class\\\\.with\\\\.dots' );\n\n      t.is ( children.length, 1 );\n\n    });\n\n    it ( 'supports filtering by a id with dots', function ( t ) {\n\n      var children = $('.dotsparent').children ( '#id\\\\.with\\\\.dots' );\n\n      t.is ( children.length, 1 );\n\n    });\n\n  });\n\n  describe ( '$.fn.closest', function ( it ) {\n\n    it ( 'finds the first matching element in the collection', function ( t ) {\n\n      var child = $('.child');\n      var closest = child.closest ( '*' );\n\n      t.deepEqual ( closest.get (), child.get () );\n\n    });\n\n    it ( 'find the first matching element walking the tree upwards', function ( t ) {\n\n      var parent = $('.parent');\n      var closest = $('.child').closest ( '.parent' );\n\n      t.deepEqual ( closest.get (), parent.get () );\n\n    });\n\n    it ( 'doesn\\'t throw if no element is found', function ( t ) {\n\n      var empty1 = $('.child').closest (),\n          empty2 = $('.child').closest ( 'foo' );\n\n      t.is ( empty1.length, 0 );\n      t.is ( empty2.length, 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.contents', function ( it ) {\n\n    it ( 'gets the children, including text and comments', function ( t ) {\n\n      var parent = $('.parent');\n      var contents = parent.contents ();\n\n      t.is ( contents.length, 13 );\n\n    });\n\n    it ( 'supports iframes', function ( t ) {\n\n      var iframe = $('iframe');\n      var contents = iframe.contents ();\n\n      t.deepEqual ( contents.get (), [iframe[0].contentDocument] );\n\n    });\n\n    if ( Supports.template ) {\n\n      it ( 'supports templates', function ( t ) {\n\n        var template = $('<template id=\"template\">    <div id=\"template-div0\">        <span>Hello, Web Component!</span>    </div>    <div id=\"template-div1\"></div>    <div id=\"template-div2\"></div></template>');\n        var contents = template.contents ();\n\n        t.is ( contents.length, 6 );\n\n      });\n\n    }\n\n  });\n\n  describe ( '$.fn.find', function ( it ) {\n\n    it ( 'gets elements in subtree', function ( t ) {\n\n      var grandparent = $('.grandparent');\n      var all = grandparent.find ( '*' );\n      var siblings = grandparent.find ( '.sibling' );\n      var dots = $('.dotsparent').find ( '.class\\\\.with\\\\.dots' );\n\n      t.is ( all.length, 8 );\n      t.is ( siblings.length, 5 );\n      t.is ( dots.length, 1 );\n\n    });\n\n    it ( 'words with document fragments', function ( t ) {\n\n      var fragment = new DocumentFragment ();\n      var div = document.createElement ( 'div' );\n\n      fragment.appendChild ( div );\n\n      var found = $(fragment).find ( 'div' );\n\n      t.is ( found.length, 1 );\n      t.is ( found[0], div );\n\n    });\n\n    it ( 'doesn\\'t throw with an empty selector', function ( t ) {\n\n      $('*').find ( '' );\n      t.pass ();\n\n    });\n\n\n  });\n\n  describe ( '$.fn.has', function ( it ) {\n\n    it ( 'filter out elements not containing the selector', function ( t ) {\n\n      var eles = $('.grandparent').children ();\n\n      t.is ( eles.has ( '.sibling' ).length, 1 );\n      t.is ( eles.has ( 'div' ).length, 1 );\n      t.is ( eles.has ( '.foo' ).length, 0 );\n\n    });\n\n    it ( 'supports dots in selectors', function ( t ) {\n\n      var eles = $('.dotsgrandparent').children ();\n\n      t.is ( eles.has ( '.class\\\\.with\\\\.dots' ).length, 1 );\n      t.is ( eles.has ( '#id\\\\.with\\\\.dots' ).length, 1 );\n\n    });\n\n    it ( 'supports nodes', function ( t ) {\n\n      var eles = $('.grandparent').children ();\n\n      t.is ( eles.has ( eles.find ( '.sibling' ).first ()[0] ).length, 1 );\n      t.is ( eles.has ( eles.find ( 'div' ).first ()[0] ).length, 1 );\n      t.is ( eles.has ( eles.find ( '.foo' ).first ()[0] ).length, 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.is', function ( it ) {\n\n    it ( 'check if the collection matches a selector', function ( t ) {\n\n      var child = $('.child');\n\n      t.true ( child.is ( 'div' ) );\n      t.true ( child.is ( 'foo, div' ) );\n      t.true ( child.is ( '.child' ) );\n      t.true ( child.is ( child ) );\n      t.true ( child.is ( $('div') ) );\n      t.false ( child.is () );\n      t.false ( child.is ( $('#foo') ) );\n\n    });\n\n    it ( 'check if the collection matches a selector with dots', function ( t ) {\n\n      var child = $('.class\\\\.with\\\\.dots');\n\n      t.true ( child.is ( '.class\\\\.with\\\\.dots' ) );\n      t.true ( child.is ( '#id\\\\.with\\\\.dots' ) );\n\n    });\n\n  });\n\n  describe ( '$.fn.next', function ( it ) {\n\n    it ( 'gets the next sibling', function ( t ) {\n\n      var child = $('.child');\n      var next = $('.next');\n\n      t.deepEqual ( child.next ().get (), next.get () );\n\n    });\n\n    it ( 'supports multiple elements', function ( t ) {\n\n      var anchors = $('.child, .prevprev');\n      var next = $('.prev, .next');\n\n      t.deepEqual ( anchors.next ().get (), next.get () );\n\n    });\n\n    it ( 'supports selector', function ( t ) {\n\n      var child = $('.child');\n      var next = $('.next');\n\n      t.deepEqual ( child.next ( '.next' ).get (), next.get () );\n      t.is ( child.next ( 'foo' ).length, 0 );\n\n    });\n\n    it ( 'supports selector with dots', function ( t ) {\n\n      var child = $('.dots\\\\.first');\n      var next = $('.class\\\\.with\\\\.dots');\n\n      t.deepEqual ( child.next ( '.class\\\\.with\\\\.dots' ).get (), next.get () );\n\n    });\n\n  });\n\n  describe ( '$.fn.nextAll', function ( it ) {\n\n    it ( 'gets all the next siblings', function ( t ) {\n\n      var anchor = $('.child');\n      var next = $('.next');\n      var nextnext = $('.nextnext');\n      var nexts = anchor.nextAll ();\n\n      t.is ( nexts.length, 2 );\n      t.is ( nexts[0], next[0] );\n      t.is ( nexts[1], nextnext[0] );\n\n    });\n\n  });\n\n  describe ( '$.fn.nextAll', function ( it ) {\n\n    it ( 'gets all the next siblings, until a selector matches', function ( t ) {\n\n      var anchor = $('.child');\n      var next = $('.next');\n      var nexts = anchor.nextUntil ( '.nextnext' );\n\n      t.is ( nexts.length, 1 );\n      t.is ( nexts[0], next[0] );\n\n    });\n\n  });\n\n  describe ( '$.fn.not', function ( it ) {\n\n    it ( 'filter by negating a comparator', function ( t ) {\n\n      var siblings = $('.sibling');\n\n      t.is ( siblings.not ().length, 5 );\n      t.is ( siblings.not ( 'div' ).length, 0 );\n      t.is ( siblings.not ( '.child' ).length, 4 );\n      t.is ( siblings.not ( '.prev, .next' ).length, 3 );\n      t.is ( siblings.not ( siblings[0] ).length, 4 );\n\n    });\n\n    it ( 'works with non-element nodes', function ( t ) {\n\n      var eles = $('<span id=\"nonnodesElement\">hi</span> there <!-- mon ami -->');\n\n      t.is ( eles.not ( eles ).length, 0 );\n      t.is ( eles.not ( '*' ).length, 0 );\n      t.is ( eles.not ( eles.first () ).length, eles.length - 1 );\n      t.is ( eles.not ( eles.get ( 0 ) ).length, eles.length - 1 );\n      t.is ( eles.not ( eles.get ( 1 ) ).length, eles.length - 1 );\n      t.is ( eles.not ( eles.get ( 2 ) ).length, eles.length - 1 );\n      t.deepEqual ( eles.not ( document.body ).get (), eles.get () );\n\n    });\n\n  });\n\n  describe ( '$.fn.parent', function ( it ) {\n\n    it ( 'gets the parent', function ( t ) {\n\n      var child = $('.child');\n      var parent = $('.parent');\n\n      t.deepEqual ( child.parent ().get (), parent.get () );\n\n    });\n\n    it ( 'supports selector', function ( t ) {\n\n      var child = $('.child');\n      var parent = $('.parent');\n\n      t.deepEqual ( child.parent ( '.parent' ).get (), parent.get () );\n      t.is ( child.parent ( 'foo' ).length, 0 );\n\n    });\n\n    it ( 'doesn\\'t throw if there\\'s no parent', function ( t ) {\n\n      t.is ( $().parent ().length, 0 );\n      t.is ( $('<div>').parent ().length, 0 );\n\n    });\n\n  });\n\n  describe ( '$.fn.parents', function ( it ) {\n\n    it ( 'gets all parents', function ( t ) {\n\n      var child = $('.child');\n      var parents = child.parents ();\n\n      t.is ( parents.length, 5 );\n\n    });\n\n    it ( 'stops at <html>', function ( t ) {\n\n      var child = $('.child');\n      var parents = child.parents ();\n\n      t.is ( parents.last ()[0], document.documentElement );\n\n    });\n\n    it ( 'supports filtering by a selector', function ( t ) {\n\n      var child = $('.child');\n      var parents = child.parents ( '.grandparent, body');\n\n      t.is ( parents.length, 2 );\n\n    });\n\n  });\n\n  describe ( '$.fn.parentsUntil', function ( it ) {\n\n    it ( 'gets all parents, until a selector matches', function ( t ) {\n\n      var child = $('.child');\n      var parent = $('.parent');\n      var parents = child.parentsUntil ( '.grandparent' );\n\n      t.is ( parents.length, 1 );\n      t.is ( parents[0], parent[0] );\n\n    });\n\n  });\n\n  describe ( '$.fn.prev', function ( it ) {\n\n    it ( 'gets the previous sibling', function ( t ) {\n\n      var child = $('.child');\n      var prev = $('.prev');\n\n      t.deepEqual ( child.prev ().get (), prev.get () );\n\n    });\n\n    it ( 'supports multiple elements', function ( t ) {\n\n      var anchors = $('.child, .nextnext');\n      var prev = $('.prev, .next');\n\n      t.deepEqual ( anchors.prev ().get (), prev.get () );\n\n    });\n\n    it ( 'supports selector', function ( t ) {\n\n      var child = $('.child');\n      var prev = $('.prev');\n\n      t.deepEqual ( child.prev ( '.prev' ).get (), prev.get () );\n      t.is ( child.prev ( 'foo' ).length, 0 );\n\n    });\n\n\n  });\n\n  describe ( '$.fn.prevAll', function ( it ) {\n\n    it ( 'gets all the previous siblings', function ( t ) {\n\n      var anchor = $('.child');\n      var prev = $('.prev');\n      var prevprev = $('.prevprev');\n      var prevs = anchor.prevAll ();\n\n      t.is ( prevs.length, 2 );\n      t.is ( prevs[0], prev[0] );\n      t.is ( prevs[1], prevprev[0] );\n\n    });\n\n  });\n\n  describe ( '$.fn.prevUntil', function ( it ) {\n\n    it ( 'gets all the previous siblings, until a selector matches', function ( t ) {\n\n      var anchor = $('.child');\n      var prev = $('.prev');\n      var prevs = anchor.prevUntil ( '.prevprev' );\n\n      t.is ( prevs.length, 1 );\n      t.is ( prevs[0], prev[0] );\n\n    });\n\n  });\n\n  describe ( '$.fn.siblings', function ( it ) {\n\n    it ( 'gets the siblings', function ( t ) {\n\n      var child = $('.child');\n      var siblings = $('.sibling').not ( child );\n\n      t.deepEqual ( child.siblings ().get (), siblings.get () );\n\n    });\n\n    it ( 'supports multiple elements in the collection', function ( t ) {\n\n      var eles = $('.child, .next');\n      var siblings = $('.parent').children ();\n\n      t.is ( eles.siblings ().length, siblings.length );\n      t.is ( eles.siblings ().not ( siblings ).length, 0 ); // The returned nodes aren't ordered\n\n    });\n\n    it ( 'supports selector', function ( t ) {\n\n      var child = $('.child');\n      var surrounding = $('.prev, .next');\n\n      t.deepEqual ( child.siblings ( '.prev, .next' ).get (), surrounding.get () );\n      t.deepEqual ( child.siblings ( '*' ).get (), child.siblings ().get () );\n      t.is ( child.siblings ( 'foo' ).length, 0 );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/modules/utilities.js",
    "content": "\ndescribe ( 'Utilities', function () {\n\n  describe ( '$.guid', function ( it ) {\n\n    it ( 'is a number', function ( t ) {\n\n      t.true ( typeof $.guid === 'number' );\n\n    });\n\n    it ( 'is incrementable', function ( t ) {\n\n      var val = $.guid;\n\n      $.guid++;\n\n      t.is ( $.guid, val + 1 );\n\n    });\n\n  });\n\n  describe ( '$.each', function ( it ) {\n\n    it ( 'iterates over an array-like object', function ( t ) {\n\n      var count = 0;\n\n      function handler () {\n        count++;\n      }\n\n      $.each ( [0, 1, 2], handler );\n      $.each ( new Array ( 3 ), handler );\n      $.each ( $([0, 1, 2]), handler );\n\n      t.is ( count, 9 );\n\n    });\n\n    it ( 'iterates over an object', function ( t ) {\n\n      var count = 0;\n      var handled = {};\n      var target = { foo: 1, bar: 2 };\n\n      function handler ( key, value ) {\n        count++;\n        handled[key] = value;\n      }\n\n      $.each ( target, handler );\n\n      t.is ( count, 2 );\n      t.deepEqual ( handled, target );\n\n    });\n\n  });\n\n  describe ( '$.extend', function ( it ) {\n\n    it ( 'extends a target object', function ( t ) {\n\n      var target = {};\n      var obj1 = { foo: 3 };\n      var obj2 = { bar: { baz: true } };\n\n      $.extend ( target, obj1, obj2 );\n\n      t.deepEqual ( target, { foo: 3, bar: { baz: true } });\n\n    });\n\n    it ( 'can extend deeply', function ( t ) {\n\n      var result1 = $.extend ( true, { foo: 1 }, { bar: { inner: 2 } } );\n      t.deepEqual ( result1, { foo: 1, bar: { inner: 2 } } );\n\n      var result2 = $.extend ( true, { foo: 1 }, { bar: [1, 2] } );\n      t.deepEqual ( result2, { foo: 1, bar: [1, 2] } );\n\n      var result3 = $.extend ( true, {}, { foo: 1 }, { bar: { inner: 2, baz: { inner2: 3 } } } );\n      t.deepEqual ( result3, { foo: 1, bar: { inner: 2, baz: { inner2: 3 } } } );\n\n      var result4 = $.extend ( true, {}, { foo: 1, bar: { baz: 3 } }, { bar: { baz: 4 } } );\n      t.deepEqual ( result4, { foo: 1, bar: { baz: 4 } } );\n\n      var result5 = $.extend ( true, {}, { foo: 1, bar: { baz: 3 } }, { bar: { baz: 4 } }, { bar: { qux: 5 }} );\n      t.deepEqual ( result5, { foo: 1, bar: { baz: 4, qux: 5 } } );\n\n    });\n\n    it ( 'works also with either zero or one object(s)', function ( t ) {\n\n      t.deepEqual ( $.extend (), {} );\n      t.deepEqual ( $.extend ( { foo: 1 } ), $ );\n      t.is ( $.foo, 1 );\n\n      delete $.foo;\n\n    });\n\n  });\n\n  describe ( '$.isArray', function ( it ) {\n\n    it ( 'checks if the passed variable is an array', function ( t ) {\n\n      t.true ( $.isArray ( new Array () ) );\n      t.true ( $.isArray ([ 1, 2, 3 ]) );\n      t.false ( $.isArray ( true ) );\n      t.false ( $.isArray ( 123 ) );\n      t.false ( $.isArray ( 'foo' ) );\n      t.false ( $.isArray ( function () {} ) );\n\n    });\n\n  });\n\n  describe ( '$.isFunction', function ( it ) {\n\n    it ( 'checks if the passed variable is a function', function ( t ) {\n\n      t.true ( $.isFunction ( function () {} ) );\n      t.false ( $.isFunction ( true ) );\n      t.false ( $.isFunction ( 123 ) );\n      t.false ( $.isFunction ( 'foo' ) );\n      t.false ( $.isFunction ([ 1, 2, 3 ]) );\n\n    });\n\n  });\n\n  describe ( '$.isNumeric', function ( it ) {\n\n    it ( 'checks if the passed variable represents a number', function ( t ) {\n\n      t.true ( $.isNumeric ( 123 ) );\n      t.true ( $.isNumeric ( '123' ) );\n      t.true ( $.isNumeric ( 3.14 ) );\n      t.true ( $.isNumeric ( '3.14' ) );\n      t.false ( $.isNumeric ( true ) );\n      t.false ( $.isNumeric ( 'foo' ) );\n      t.false ( $.isNumeric ( 'foo2' ) );\n      t.false ( $.isNumeric ( '2foo' ) );\n      t.false ( $.isNumeric ([ 1, 2, 3 ]) );\n      t.false ( $.isNumeric ( function () {} ) );\n\n    });\n\n  });\n\n  describe ( '$.isPlainObject', function ( it ) {\n\n    it ( 'checks if the passed variable is a plain object', function ( t ) {\n\n      t.true ( $.isPlainObject ( {} ) );\n      t.true ( $.isPlainObject ( Object.create ( null ) ) );\n      t.false ( $.isPlainObject ( [] ) );\n      t.false ( $.isPlainObject ( function () {} ) );\n      t.false ( $.isPlainObject ( window ) );\n      t.false ( $.isPlainObject ( $ ) );\n      t.false ( $.isPlainObject ( $('body') ) );\n      t.false ( $.isPlainObject ( 'foo' ) );\n      t.false ( $.isPlainObject ( true ) );\n      t.false ( $.isPlainObject ( undefined ) );\n      t.false ( $.isPlainObject ( null ) );\n      t.false ( $.isPlainObject ( 0 ) );\n      t.false ( $.isPlainObject ( Date ) );\n      t.false ( $.isPlainObject ( new Date () ) );\n\n    });\n\n  });\n\n  describe ( '$.isWindow', function ( it ) {\n\n    it ( 'checks if the passed variable is a window', function ( t ) {\n\n      t.true ( $.isWindow ( window ) );\n      t.false ( $.isWindow ( document ) );\n      t.false ( $.isWindow ( 'foo' ) );\n      t.false ( $.isWindow ( true ) );\n      t.false ( $.isWindow ( 123 ) );\n      t.false ( $.isWindow ([ 1, 2, 3 ]) );\n      t.false ( $.isWindow ( function () {} ) );\n\n    });\n\n  });\n\n  describe ( '$.parseHTML', function ( it ) {\n\n    it ( 'parses an html string', function ( t ) {\n\n      var htmls = [ // to parse => expected\n        ['<a></a>', '<a></a>'],\n        ['<img>', '<img>'],\n        ['<input>', '<input>']\n      ];\n\n      htmls.forEach ( function ( htmls ) {\n        t.is ( $.parseHTML ( htmls[0] )[0].outerHTML, htmls[1] );\n      })\n\n    });\n\n    it ( 'supports missing or falsy arguments', function ( t ) {\n\n      t.is ( $.parseHTML ( 0 ).length, 0 );\n      t.is ( $.parseHTML ( '' ).length, 0 );\n      t.is ( $.parseHTML ( undefined ).length, 0 );\n      t.is ( $.parseHTML ( null ).length, 0 );\n\n    });\n\n    it ( 'supports malformed unclosed tags', function ( t ) {\n\n      var htmls = [ // to parse => expected\n        ['<a>', '<a></a>'],\n        ['<div>', '<div></div>']\n      ];\n\n      htmls.forEach ( function ( htmls ) {\n        t.is ( $.parseHTML ( htmls[0] )[0].outerHTML, htmls[1] );\n      })\n\n    });\n\n    it ( 'supports malformed closed tags', function ( t ) {\n\n      var htmls = [ // to parse => expected\n        ['<img />', '<img>'],\n        ['<input />', '<input>']\n      ];\n\n      htmls.forEach ( function ( htmls ) {\n        t.is ( $.parseHTML ( htmls[0] )[0].outerHTML, htmls[1] );\n      })\n\n    });\n\n    it ( 'supports simple table elements', function ( t ) {\n\n      var htmls = [ // to parse => expected\n        ['<tbody>', '<tbody></tbody>'],\n        ['<thead>', '<thead></thead>'],\n        ['<tfoot>', '<tfoot></tfoot>'],\n        ['<tr>', '<tr></tr>'],\n        ['<td>', '<td></td>'],\n        ['<th>', '<th></th>']\n      ];\n\n      htmls.forEach ( function ( htmls ) {\n        t.is ( $.parseHTML ( htmls[0] )[0].outerHTML, htmls[1] );\n      })\n\n    });\n\n    it ( 'supports advanced table elements', function ( t ) {\n\n      var htmls = [ // to parse => expected\n        ['<tbody><tr></tr></tbody>', '<tbody><tr></tr></tbody>'],\n        ['<thead><tr></tr></thead>', '<thead><tr></tr></thead>'],\n        ['<tfoot><tr></tr></tfoot>', '<tfoot><tr></tr></tfoot>'],\n        ['<tr><td></td></tr>', '<tr><td></td></tr>'],\n        ['<td><p></p></td>', '<td><p></p></td>'],\n        ['<th><p></p></th>', '<th><p></p></th>']\n      ];\n\n      htmls.forEach ( function ( htmls ) {\n        t.is ( $.parseHTML ( htmls[0] )[0].outerHTML, htmls[1] );\n      })\n\n    });\n\n    it ( 'preserves leading/trailing whitespace', function ( t ) {\n\n      var htmls = [\n        '  <b>foo</b>',\n        '<b>foo</b>  ',\n        '  <b>foo</b>  ',\n        '  <div></div>',\n        '<div></div>   ',\n        '  <div></div>   '\n      ];\n\n      htmls.forEach ( function ( html ) {\n        t.is ( $('<div>').append ( $.parseHTML ( html ) ).html (), html );\n      });\n\n    });\n\n    it ( 'doesn\\'t overwrite previous DOM nodes', function ( t ) {\n\n      var span = $('<span>CONTENT</span>');\n\n      $('<div></div>');\n\n      t.is ( span.html (), 'CONTENT' );\n\n    });\n\n    it.skip ( 'doesn\\'t have prototype inheritance issues', function ( t ) {\n\n      var constructor = $('<constructor>CONTENT</constructor>');\n\n      t.is ( constructor.html (), 'CONTENT' );\n\n    });\n\n  });\n\n  describe ( '$.unique', function ( it ) {\n\n    it ( 'filters duplicates out of arrays', function ( t ) {\n\n      var numbers = [1, 1, 2, 6, 2];\n\n      t.deepEqual ( $.unique ( numbers ), [1, 2, 6] );\n\n      var eles = [document.body, document.body];\n\n      t.deepEqual ( $.unique ( eles ), [document.body] );\n\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "test/playwright.mjs",
    "content": "\n/* IMPORT */\n\nimport path from 'node:path';\nimport process from 'node:process';\nimport {setTimeout as delay} from 'node:timers/promises';\nimport {pathToFileURL} from 'node:url';\nimport {chromium, firefox, webkit} from 'playwright';\nimport color from 'tiny-colors';\n\n/* MAIN */\n\nconst testBrowser = async ( engine, name ) => {\n\n  const testPath = path.join ( process.cwd (), 'test', 'index.html' );\n  const testUrl = pathToFileURL ( testPath ).toString ();\n\n  const browser = await engine.launch ();\n  const context = await browser.newContext ();\n  const page = await context.newPage ();\n\n  await page.goto ( testUrl );\n  await delay ( 3000 );\n\n  const result = await page.innerHTML ( '#qunit-testresult-display' );\n  const isPass = result.includes ( 'with 0 failed' );\n\n  console.log ( `${name}: ${isPass ? color.green ( 'PASS' ) : color.red ( 'FAIL' )}` );\n\n  return isPass;\n\n};\n\nconst testBrowsers = async () => {\n\n  const names = ['Chromium', 'Firefox', 'Webkit'];\n  const engines = [chromium, firefox, webkit];\n  const results = await Promise.all ( engines.map ( ( engine, index ) => testBrowser ( engine, names[index] ) ) );\n  const isPass = results.every ( Boolean );\n\n  process.exit ( isPass ? 0 : 1 );\n\n};\n\n/* RUNNING */\n\nawait testBrowsers ();\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"forceConsistentCasingInFileNames\": true,\n    \"noUnusedParameters\": false,\n    \"strictNullChecks\": false\n  },\n  \"include\": [\n    \"src\"\n  ]\n}\n"
  }
]