[
  {
    "path": ".browserslistrc",
    "content": "ie 9"
  },
  {
    "path": ".circleci/config.yml",
    "content": "version: 2.1\norbs:\n  node: circleci/node@4.1.0\njobs:\n  test:\n    executor:\n      name: node/default\n    parameters:\n      os:\n        type: string\n      node-version:\n        type: string\n    steps:\n      - checkout\n      - node/install-packages\n      - run: npm test\n      - run:\n          name: code-coverage\n          command: 'bash <(curl -s https://codecov.io/bash)'\n\nworkflows:\n  build:\n    jobs:\n      - test:\n          matrix:\n            parameters:\n              os:\n                - docker\n              node-version:\n                - '6.17.1'\n                - '8.17.0'\n                - '10.23.1'\n                - '12.20.1'\n                - '14.15.4'\n"
  },
  {
    "path": ".codecov.yml",
    "content": "codecov:\n  branch: master\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - '**'\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: '14.15.1'\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm install\n\n      - name: Run tests\n        run: npm test\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\nnode_modules\ndocs/_site\ndocs/.sass-cache\ndocs/.jekyll-metadata\ncoverage\ndocs/vendor"
  },
  {
    "path": ".npmignore",
    "content": "docs\n__test__\n.circleci\nWISHLIST.md\nwebpack.config.js\nRelease.md\nprettier.config.js\n.prettierignore\n.codecov.yml\n.browserslistrc"
  },
  {
    "path": ".nvmrc",
    "content": "14.15.1"
  },
  {
    "path": ".prettierignore",
    "content": "*.min.js"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\n### 2.3.1 - 2021-01-17\n\n- - **[Improvement]** #708 Support restored for Node 6, 8, 10 and 12.\n\n### 2.3.0 - 2020-11-25\n\n- **[Feature]** #682 Multiple word search\n- **[Feature]** #683 Debounced keyup handler in search\n- **[Improvement]** #679 Faster search\n- **[Website]** #684 Add more documentation for automagical search and sort elements\n\n### 2.1.0 - 2020-11-21\n\n- **[Feature]** #634 Add item template function\n- **[Feature]** #591 Support adding custom pagination item\n- **[Bugfix]** #667 Fix `getAttribute` fallback method\n- **[Bugfix]** #636 Aviod strange ie11 bug\n- **[Bugfix]** #570 Don't empty original value array when adding items async\n- **[Misc]** #637 Reuse iteration indices\n\n### 2.0.0 - 2020-11-21 - Winter cleanup 🧹\n\n- **[Breaking]** Drop support for IE6-8\n- **[Misc]** Update dev dependencies to latest version: Webpack 3.12.0 -> 5.6.0, jest 23.3 -> 26.6.3, jquery 3.3.1 -> 3.5.1, Removed: jshint jshint-loader\n- **[Misc]** Replace uglify-js with terser\n- **[Misc]** Update Node for dev from 6.15 to 14.15.1\n- **[Misc]** Prettier on everything\n- **[Misc]** Make release script simpler\n- **[Misc]** Rename History.md to CHANGELOG.md\n- **[Misc]** Use `babal-loader` with `@babel/preset-env` for supporting IE9-11\n- **[Misc]** Add source-maps to `/dist`\n- **[Misc]** Added WISHLIST.md for feature requests to allow cleanup of issue list.\n- **[Misc]** Update CircleCI from 1.0 to 2.0\n- **[Website]** Update Jekyll to remove security warnings\n- **[Website]** Fix all examples (sorry that they we're broken)\n- **[Website]** Use https instead of http for listjs.com\n- **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7)\n- **[Bugfix]** Use one event listener per pagination and select page via data attributes\n  [See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8)\n- **[Bugfix]** Don't break pagination if page=0\n  [See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d)\n  [See commit →](https://github.com/javve/list.js/commit/725bc188d7ba72c7d234bda1e09fc50b40661310)\n\n### 2017-01-29 v1.5.0\n\n- **[Feature]** Bundle fuzzySearch and pagination plugins into List.js  \n  [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489)\n- **[Misc]** Switch from Grunt to Webpack and from Mocha to Jest  \n  [See commit →](https://github.com/javve/list.js/commit/8376ef01b1da4b6e60a7457d628d97a803a82e14)\n\n### 2017-01-19 v1.4.1\n\n- **[Bugfix]** Move string-natural-compare to dependencies instead of devDependencies\n  [See commit →](https://github.com/javve/list.js/commit/c17162b26fd5093d3ddde01e11a3f748310d993c)\n\n### 2017-01-15 v1.4.0\n\n- **[Bugfix/Feature]** Change natural-sort library to support custom alphabets\n  and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong.\n  [See commit →](https://github.com/javve/list.js/commit/81e1386bed88d1f932e729feca2b3649e489bdfe)\n\n### 2016-10-23 v1.3.0\n\n- **[Bugfix]** Make mkdir in build script OS agnostic\n  [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5)\n- **[Bugfix]** Make it possible to reset search columns\n  [See commit →](https://github.com/javve/list.js/commit/37edc1b98bf63a684d633f29e2f52106c21eaf7d)\n- **[Bugfix]** Allow empty list without template.\n  [See commit →](https://github.com/javve/list.js/commit/95329b945c64c0ad0693df120ef00547eac9b029)\n- **[Bugfix]** Make it possible to use <tr> as string template\n  [See commit →](https://github.com/javve/list.js/commit/38583e097cb75e369779b46c6129e1b8b8324f24)\n- **[Misc]** Update NaturalSort to 0.8.1\n  [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a)\n- **[Misc]** Use local Browserify\n  [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8)\n- **[Misc]** Add version to start of minified file\n  [See commit →](https://github.com/javve/list.js/commit/79daff8da51aa047aae5d31e0af12cb30b395048)\n- **[Misc]** Switch to GitHub pages for listjs.com\n  [See commit →](https://github.com/javve/list.js/commit/1af94012de89fd6bcf8446c31305ad517507c44b)\n\n### 2016-02-27: v1.2.0\n\nIt's been two years since the last update of List.js. That is absolutely not ok\nand I'm very sorry that it has taken so long. I promise I'll do better in the future!\n\nAnyways, this release introduces a bunch of bug fixes and improvements, but most\nimportantly: List.js now has support for data attributes PLUS all other attributes.\n[See an example]() and [read the docs](https://www.listjs.com/docs#example-6).\n\nAnother noteworthy update is that I've left Component and moved back all utils\nto the core lib. Instead I'm using Browserify as module handler.\n\nI hope you'll like this update!\n\n- **[Misc]** Move form Component to Browserify\n  [See commit →](https://github.com/javve/list.js/commit/58695c93849b78787d9cf78cbf9be20b01cdcc8a)\n- **[Misc]** Add tests to make sure List.js works with require.js\n  [See commit →](https://github.com/javve/list.js/commit/360098a04b87e18afd1b09e293a01a8dc113a01e)\n- **[Misc]** Update all dependencies to latest version\n  [See commit →](https://github.com/javve/list.js/commit/881991cd204a19af5ed3c62c1239c1206fa51e6c)\n- **[Breaking]** set sort order with List.js not sort function.\n  [See commit →](https://github.com/javve/list.js/commit/81d1148489c99b8503e725805c2a6ce2bde47b11)\n- **[Breaking]** set default page size to 10000 instead of 200 (because: page size is confusing for new users)\n  [See commit →](https://github.com/javve/list.js/commit/618565b203b61c34b868a9cb86eea899e75ea4b6)\n- **[Breaking]** Rename list.helpers to list.utils\n  [See commit →](https://github.com/javve/list.js/commit/58695c93849b78787d9cf78cbf9be20b01cdcc8a)\n- **[Feature]** Add support for data attributes and custom attributes ex. links and images. [See docs](https://listjs.com/).\n  [See commit →](https://github.com/javve/list.js/commit/a8e083dc0f642e90b7a3f3cc11b12f9bb353d3a0)\n- **[Feature]** Add toJSON method.\n  [See commit →](https://github.com/javve/list.js/commit/570fd10e65fcf2e0d3d959ca42137625d9fd3b7c)\n- **[Feature]** Add reIndex method that should be called if the html have been changed by something except List.js.\n  [See commit →](https://github.com/javve/list.js/commit/825b2b55d339de2bb78eb41145d56a8b27d3d888)\n- **[Feature]** Add option searchColumns to defined default columns to search in.\n  [See commit →](https://github.com/javve/list.js/commit/b8b74f21f78c17f1c1842480084ffdb58edc26cd)\n- **[Feature]** Support <tr> in options.item\n  [See commit →](https://github.com/javve/list.js/commit/9700858168811b6559983d2cb792014213b817a6)\n- **[Feature]** Make it possble to add event handlers on init `new List('listId', { searchComplete: function(list) {} })`.\n  [See commit →](https://github.com/javve/list.js/commit/b8b74f21f78c17f1c1842480084ffdb58edc26cd)\n- **[Bugfix]** Don't throw error if searching in a empty list.\n  [See commit →](https://github.com/javve/list.js/commit/d805494732922024bb99090fb6521021189861e9)\n- **[Bugfix]** Make it possible to use item.visible() on items not yet templated.\n  [See commit →](https://github.com/javve/list.js/commit/8e898b0e55a7d47a77ee27f109602bdb63183fda)\n- **[Bugfix]** Include reference to List when initializing plugins. Fix for require.js which don't have a global reference to List.\n  [See commit →](https://github.com/javve/list.js/commit/40d3c5e5f98cf3bcb9624a5717d4435a0b6f49f6)\n- **[Bugfix]** Fix index async. Fix #268\n  [See commit →](https://github.com/javve/list.js/commit/27e2d6fdeee7090eb1342a108013db898fc29b96)\n- **[Bugfix]** Fix add async\n  [See commit →](https://github.com/javve/list.js/commit/237f926d3ea0036ffb8b255dd0da42387b6a653a)\n- **[Bugfix]** Don't add empty item if empty list is initated with empty array.\n  [See commit →](https://github.com/javve/list.js/commit/607a176c12b2219fb5204a789cd44ef367a0025f)\n- **[Bugfix]** Make sort case insensitive by default for the automatic buttons\n  [See commit →](https://github.com/javve/list.js/commit/44260b862f74dccd248d08ca1f7df2b422c8f439)\n- **[Bugfix]** Clear all values from source item. Case: list.add({}) should not\n  get same values as first item in list\n  [See commit →](https://github.com/javve/list.js/commit/3a4733d52cff25ef99ee8a1326c0b54be81d64ca)\n\n### 2014-02-03: 1.1.1\n\n- **[Bugfix]** Update `javve/events` version which fixes critical bugs in Safari\n  for PC and PhantomJS (which makes the command line tests work again).\n- **[Bugfix]** Clear search when clicking in the HTML5 clear button.\n- **[Misc]** Add History.md file for changelog instead of having it at Listjs.com.\n\n### 2014-02-03: 1.1.0\n\n- **[Breaking]** The sorting API is update so it looks like this\n  `listObj.sort('name', { order: \"asc \"})` and `listObj.sort('name', { order: \"desc \"})`\n  instead or `listObj.sort('name', { desc: true/false })`.\n- **[Feature]** Added support for default sort function `new List('id', { sortFunction: function(itemA, itemB) { .. }})`\n- **[Feature]** Adding `data-order=\"asc/desc\"` to a sort button makes that button only sort `asc` or `desc`, ie no to\n- **[Bugfix]** Fix `grunt watch` bug.\n- **[Bugfix]** Remove sorting when searching and filtering.\n- **[Bugfix]** Fix sorting and search when using pagiation plugin\n\n### 2014-01-17: 1.0.2\n\n- **[Bugfix]** Fix error that broke the lib in IE8.\n\n### 2013-11-12: 1.0.0\n\n- **[Feature]** Add more events and enable to add them on initialization.\n- **[Feature]** Add support for Component.js, Bower, RequireJS and CommonJS\n- **[Feature]** Make it possible to remove event handlers by `.off('event', handler)`\n- **[Improvement]** Many new tests\n- **[Improvement]** Paging plugin default classes and structure now correspons to <a href=\"https://twitter.github.com/bootstrap/components.html#pagination\">Twitter Bootstraps pagination</a>.\n- **[Improvement]** Make sorting case-insensitive (thanks @thomasklemm)\n- **[Improvement]** Add item.\\_values for direct access to a items values. Simplifies debugging. Note: Always use item.values() when interacting with the values.\n- **[Bugfix]** `.add(items, callbak)` with `callback` set does no longer add an extra item.\n- **[Bugfix]** `templater.set()` no longer is called twice in a `templater.get()` call.\n- **[Bugfix]** Fix error when trying to sort `undefined,null,etc` values.\n- **[Bugfix]** Fix error when trying to search `undefined,null,etc` values.\n- **[Bugfix]** Fix issue #51, problems with filters/search + paging.\n- **[Misc]** Almost completely rewritten codebase and started using <a href=\"https://github.com/component/component\">Component</a>\n- **[Misc]** Moved the website into another repo called <a href=\"https://github.com/javve/list-website\">list-website</a>\n- **[Misc]** Add documentation for searching in specific columns.\n- **[Change]** `listObj.get('valueName', value)` does now always returns an array. Previously it return an object if only one item matched and null if no match was found.\n- **[Change]** The default sort order is now `asc` instead of `desc`.\n- **[Change]** Syntax for searching in specific columns are now `.search('val', [ 'columnName', 'columnName2' ])` instead of `.search('val', { columnName: true, columnName2: true })`.\n- **[Change]** Move plugins into seperated repos: <a href=\"https://github.com/javve/list.pagination.js\">github.com/javve/list.pagination.js</a> and <a href=\"https://github.com/javve/list.fuzzysearch.js\">github.com/javve/list.fuzzysearch.js</a>\n- **[Change]** Plugin initiation have changed. See <a href=\"/docs/plugins\">getting started with plugins\n\n### 2012-04-24: 0.2.1\n\n- Fuzzy Search plugin, `.filter()` changes and bug fixes _[Read more »](http://jonnystromberg.com/listjs-0-2-1-release-notes/)_\n\n### 2012-01-23: 0.2.0\n\n- Lots of updates and interesting features. _[Read more »](http://jonnystromberg.com/listjs-0-2-0-plugins-paging/)_\n\n### 2011-12-15: 0.1.4\n\n- `.filters()`, `.sort()` and `.search()` now deped on each other. If the list is filtered and then there is a search, the items hidden by the filters will stay hidden etc.\n- `.filter()` is the only way to reset filter. `.filter(false)` does not work anymore.\n\n### 2011-11-29: 0.1.3 release\n\n- Added function `.clear()` that removes all items from the list\n- Changed the sort function to be based on `data-sort` instead of `rel`\n- When sorting one category, all sort-related classes will be removed from the other sort buttons\n- Updated `.sort(valueName, sortFunction)` to `.sort(valueName, options)`, se more info in the documentation\n\n### 2011-11-16: 0.1.2 release\n\n- Sorting is now indicated by class `asc` or `desc` at sorting buttons\n- Added three new small helper functions `hasClass(element, class)`, ` addClass(element, class)`` and  `removeClass(element, class)`</li>\n\n### 2011-10-20: 0.1.1 release\n\n- Added possibility to reverse sort the list\n\n### 2011-10-18: 0.1 release\n\n- Examples at Listjs.com works in IE7,8,9 (IE6 is not tested, should work)\n- More documentation\n- Misc bug fixes\n\n### 2011-10-15 Final alpha 0.3 release\n\n- More documentation\n- Only show 200 items at same time, huge speed increase\n- Misc bug fixes\n\n### 2011-08-08 Alpha 0.2 release\n\n- Added asynchronous item adding\n- Added asynchronous list indexing\n- Improved (but incomplete) documentation\n- Bugfixes and improved helper functions\n- Show helper functions non-minified\n\n### 2011-07-25 Alpha 0.1 release\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2011-2018 Jonny Strömberg, jonnystromberg.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished 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 FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# List.js\n\nPerfect library for adding **search**, **sort**, **filters** and **flexibility** to\n**tables**, **lists** and various HTML elements. Built to be invisible and work on existing HTML.\nReally simple and easy to use!\n\n[![Donate](https://s3.amazonaws.com/listjs/donate-coffee.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E)\n[![npm version](https://badge.fury.io/js/list.js.svg)](https://badge.fury.io/js/list.js)\n[![CircleCI](https://circleci.com/gh/javve/list.js/tree/master.svg?style=shield)](https://circleci.com/gh/javve/list.js/tree/master)\n[![codecov](https://codecov.io/gh/javve/list.js/branch/master/graph/badge.svg)](https://codecov.io/gh/javve/list.js)\n[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/list.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/list.js)\n\n### Core idea\n\n- Simple and invisible\n- Easy to apply to existing HTML\n- No dependencies\n- Fast\n- Small\n- Handle thousands of items\n\n### Features\n\n- Works both lists, tables and almost anything else. E.g. `<div>`,`<ul>`,`<table>`, etc.\n- Search [Read more ›](https://listjs.com/docs/list-api#search)\n- Sort [Read more ›](https://listjs.com/docs/list-api#sort)\n- Filter [Read more ›](https://listjs.com/docs/list-api#filter)\n- Simple templating system that adds possibility to add, edit, remove items [Read more ›](https://listjs.com/docs/list-api#add)\n- Support for Chrome, Safari, Firefox, IE9+\n\n### Download / Install\n\n##### Via NPM\n\n```\nnpm install list.js\n```\n\n##### Via Bower\n\n```\nbower install list.js\n```\n\n##### Via CDNJS\n\n```html\n<script src=\"//cdnjs.cloudflare.com/ajax/libs/list.js/2.3.1/list.min.js\"></script>\n```\n\n##### Via Direct Download\n\n- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v2.3.1/dist/list.min.js)\n- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v2.3.1/dist/list.js)\n\n### Questions / How to?\n\nhttps://stackoverflow.com/questions/tagged/list.js\n\n### Demo / Examples\n\n- [Existing list](https://listjs.com/examples/existing-list)\n- [Existing list + add](https://listjs.com/examples/existing-list-add)\n- [New list](https://listjs.com/examples/new-list)\n- [Add, get, remove](https://listjs.com/examples/add-get-remove)\n- [Fuzzy search](https://listjs.com/examples/fuzzy-search)\n- [Pagination](https://listjs.com/examples/pagination)\n- [Search in specific column](https://codepen.io/javve/pen/GpZpow)\n- [Filter in range](https://codepen.io/javve/pen/wKGKWL)\n- [Show message filter/search results in 0 items](https://codepen.io/javve/pen/VvavzG)\n- [Only show list after search/filter](https://codepen.io/javve/pen/YyqyRg)\n\n## Documentation\n\n- [Getting started](https://listjs.com/docs)\n- [Options](https://listjs.com/docs/options)\n- [List API](https://listjs.com/docs/list-api)\n- [Item API](https://listjs.com/docs/item-api)\n- [Changelog](https://github.com/javve/list.js/blob/master/CHANGELOG.md)\n\n### Thanks to [all lovely contributors](https://github.com/javve/list.js/graphs/contributors)! Want to join them?\n\n- Read more at [listjs.com/overview/contribute](https://listjs.com/overview/contribute)\n\n### Creator\n\n|                                                                                          | Jonny Strömberg [@javve](https://twitter.com/javve)                                                                                                                                                                                                          |\n| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) |\n\n## License (MIT)\n\nCopyright (c) 2011-2020 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)>\n[javve.com](https://javve.com)\n"
  },
  {
    "path": "Release.md",
    "content": "# RELEASE\n\n1. `npm version patch|minor|major` (depending on what kind of release it is)\n2. `npm publish`\n3. Update links in README.md with new version number\n"
  },
  {
    "path": "WISHLIST.md",
    "content": "# Wishlist\n\n- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96\n- Regex in search https://github.com/javve/list.js/issues/371\n- Keep original order? + know\n- Automatically add item in the right place if sort is active\n- How to handle arrays?\n- [Implement debouncing in search?](https://github.com/javve/list.js/issues/621)\n- Better search https://github.com/javve/list.js/pull/312/files ?\n- Investigate sort button defaults:\n  - https://github.com/javve/list.js/issues/316\n  - https://github.com/javve/list.js/pull/301\n- Improve testability by decoupling things and make it possible to use require('') in tests\n- Add .remove() method to remove all listeners etc.\n- Example of more advanced filtering\n- Example with multiple lists\n- Multiple filter functionality\n- Activ search term, sort order, filter, etc\n- [Smarter pagination window](https://github.com/javve/list.js/issues/599)\n- [Handle input checkboxes in list](https://github.com/javve/list.js/pull/630)\n- Use query-selector to support more than just ID for item and list initiation\n\n# Known bugs\n\nPagination does not respect .show(i, page)\n"
  },
  {
    "path": "__test__/add-get-remove.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Add, get, remove', function () {\n  var list\n\n  beforeAll(function () {\n    list = fixture.list(['name'], [{ name: 'Jonny' }])\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  afterEach(function () {\n    list.clear()\n    list.add({ name: 'Jonny' })\n  })\n\n  describe('Add', function () {\n    it('should add one item', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n    })\n    it('should add two items', function () {\n      list.add([{ name: 'Martina' }, { name: 'Angelica' }])\n      expect(list.items.length).toEqual(3)\n    })\n    it('should add async items', function (done) {\n      var itemsToAdd = [\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n        { name: 'Sven' },\n      ]\n      list.add(itemsToAdd, function (items) {\n        expect(list.items.length).toEqual(91)\n        expect(items.length).toEqual(90)\n        expect(itemsToAdd.length).toEqual(90)\n        done()\n      })\n    })\n    it('should add async items to empty list', function (done) {\n      list.clear()\n      list.add([{ name: 'Sven' }], function () {\n        expect(list.items.length).toEqual(1)\n        done()\n      })\n    })\n  })\n\n  describe('Get', function () {\n    it('should return array with one item', function () {\n      var items = list.get('name', 'Jonny')\n      expect(items[0].values().name).toEqual('Jonny')\n    })\n    it('should return empty array', function () {\n      var items = list.get('name', 'jonny')\n      expect(items.length).toBe(0)\n    })\n    it('should return two items', function () {\n      list.add({ name: 'Jonny' })\n      var items = list.get('name', 'Jonny')\n      expect(items.length).toEqual(2)\n      expect(items[0].values().name).toEqual('Jonny')\n      expect(items[1].values().name).toEqual('Jonny')\n    })\n  })\n\n  describe('Remove', function () {\n    it('should remove one item', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n      var count = list.remove('name', 'Jonas')\n      expect(count).toEqual(1)\n      expect(list.items.length).toEqual(1)\n    })\n    it('should not remove anything due to case sensitivity', function () {\n      var count = list.remove('name', 'jonny')\n      expect(count).toBe(0)\n      expect(list.items.length).toEqual(1)\n    })\n\n    it('should avoid node not found error', function () {\n      var item = list.get('name', 'Jonny')[0]\n      list.list.removeChild(item.elm)\n      var count = list.remove('name', 'Jonny')\n      expect(count).toBe(1)\n      expect(list.items.length).toEqual(0)\n    })\n\n    it('should remove eight items', function () {\n      list.add({ name: 'Jonny' })\n      list.add({ name: 'Jonny' })\n      list.add({ name: 'Sven' })\n      list.add({ name: 'Jonny' })\n      list.add({ name: 'Jonny' })\n      list.add({ name: 'Jonny' })\n      list.add({ name: 'Jonas' })\n      list.add({ name: 'Jonny' })\n      list.add({ name: 'Jonny' })\n      expect(list.items.length).toEqual(10)\n      var count = list.remove('name', 'Jonny')\n      expect(count).toEqual(8)\n      expect(list.items.length).toEqual(2)\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/buttons.test.js",
    "content": "const $ = require('jquery'),\n  List = require('../src/index')\n\nfunction fireKeyup(el) {\n  if (document.createEvent) {\n    var evObj\n    if (window.KeyEvent) {\n      evObj = document.createEvent('KeyEvents')\n      evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0)\n    } else {\n      evObj = document.createEvent('UIEvents')\n      evObj.initUIEvent('keyup', true, true, window, 1)\n    }\n    el.dispatchEvent(evObj)\n  } else if (document.createEventObject) {\n    el.fireEvent('onkeyup')\n  } else {\n    // IE 5.0, seriously? :)\n  }\n}\n\n// http://stackoverflow.com/questions/5658849/whats-the-equivalent-of-jquerys-trigger-method-without-jquery\nfunction fireClick(el) {\n  var evt\n  if (document.createEvent) {\n    evt = document.createEvent('MouseEvents')\n    evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null)\n  }\n  evt ? el.dispatchEvent(evt) : el.click && el.click()\n}\n\ndescribe('Button', function () {\n  var list\n\n  beforeEach(function () {\n    $('body').append(\n      $(\n        '<div id=\"parse-list\">\\\n      <input class=\"search\" />\\\n      <span class=\"sort\" id=\"sort-name\" data-sort=\"name\">Sort name</span>\\\n      <span class=\"sort\" id=\"sort-name-asc\" data-sort=\"name\" data-order=\"asc\">Sort name asc</span>\\\n      <span class=\"sort\" id=\"sort-name-desc\" data-sort=\"name\" data-order=\"desc\">Sort name desc</span>\\\n      <div class=\"list\">\\\n        <div><span class=\"name\">Jonny</span><span class=\"born\">1986</span></div>\\\n        <div><span class=\"name\">Jocke</span><span class=\"born\">1985</span></div>\\\n      </div>\\\n    </div>'\n      )\n    )\n\n    list = new List('parse-list', {\n      valueNames: ['name', 'born'],\n    })\n  })\n\n  afterEach(function () {\n    $('#parse-list').remove()\n  })\n\n  describe('Sort', function () {\n    it('should trigger sortStart', function (done) {\n      list.on('sortComplete', function () {\n        done()\n      })\n      fireClick($('#sort-name')[0])\n    })\n    it('should trigger sortComplete', function (done) {\n      list.on('sortComplete', function () {\n        done()\n      })\n      fireClick($('#sort-name')[0])\n    })\n\n    it('should switch sorting order when clicking multiple times', function (done) {\n      var sortRun = 0\n      list.on('sortComplete', function () {\n        sortRun++\n        if (sortRun == 1) {\n          expect($('#sort-name').hasClass('asc')).toBe(true)\n          expect($('#sort-name').hasClass('desc')).toBe(false)\n          setTimeout(function () {\n            fireClick($('#sort-name')[0])\n          }, 50)\n        } else if (sortRun == 2) {\n          expect($('#sort-name').hasClass('asc')).toBe(false)\n          expect($('#sort-name').hasClass('desc')).toBe(true)\n          setTimeout(function () {\n            fireClick($('#sort-name')[0])\n          }, 50)\n        } else if (sortRun == 3) {\n          expect($('#sort-name').hasClass('asc')).toBe(true)\n          expect($('#sort-name').hasClass('desc')).toBe(false)\n          done()\n        }\n      })\n      expect($('#sort-name').hasClass('asc')).toBe(false)\n      expect($('#sort-name').hasClass('desc')).toBe(false)\n      fireClick($('#sort-name')[0])\n    })\n\n    it('should sort with predefined order', function (done) {\n      var sortRun = 0\n      list.on('sortComplete', function () {\n        sortRun++\n        if (sortRun == 1) {\n          expect($('#sort-name').hasClass('asc')).toBe(true)\n          expect($('#sort-name').hasClass('desc')).toBe(false)\n          expect($('#sort-name-asc').hasClass('asc')).toBe(true)\n          expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('desc')).toBe(false)\n          setTimeout(function () {\n            fireClick($('#sort-name-asc')[0])\n          }, 50)\n        } else if (sortRun == 2) {\n          expect($('#sort-name').hasClass('asc')).toBe(true)\n          expect($('#sort-name').hasClass('desc')).toBe(false)\n          expect($('#sort-name-asc').hasClass('asc')).toBe(true)\n          expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('desc')).toBe(false)\n          setTimeout(function () {\n            fireClick($('#sort-name-asc')[0])\n          }, 50)\n        } else if (sortRun == 3) {\n          expect($('#sort-name').hasClass('asc')).toBe(true)\n          expect($('#sort-name').hasClass('desc')).toBe(false)\n          expect($('#sort-name-asc').hasClass('asc')).toBe(true)\n          expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('desc')).toBe(false)\n          setTimeout(function () {\n            fireClick($('#sort-name-desc')[0])\n          }, 50)\n        } else if (sortRun == 4) {\n          expect($('#sort-name').hasClass('asc')).toBe(false)\n          expect($('#sort-name').hasClass('desc')).toBe(true)\n          expect($('#sort-name-asc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('desc')).toBe(true)\n          setTimeout(function () {\n            fireClick($('#sort-name-desc')[0])\n          }, 50)\n        } else if (sortRun == 5) {\n          expect($('#sort-name').hasClass('asc')).toBe(false)\n          expect($('#sort-name').hasClass('desc')).toBe(true)\n          expect($('#sort-name-asc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n          expect($('#sort-name-desc').hasClass('desc')).toBe(true)\n          done()\n        }\n      })\n      expect($('#sort-name').hasClass('asc')).toBe(false)\n      expect($('#sort-name').hasClass('desc')).toBe(false)\n      expect($('#sort-name-asc').hasClass('asc')).toBe(false)\n      expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n      expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n      expect($('#sort-name-desc').hasClass('desc')).toBe(false)\n      fireClick($('#sort-name-asc')[0])\n    })\n\n    it('buttons should change class when sorting programmatically', function (done) {\n      list.on('sortComplete', function () {\n        expect($('#sort-name').hasClass('asc')).toBe(true)\n        expect($('#sort-name').hasClass('desc')).toBe(false)\n        expect($('#sort-name-asc').hasClass('asc')).toBe(true)\n        expect($('#sort-name-asc').hasClass('desc')).toBe(false)\n        expect($('#sort-name-desc').hasClass('asc')).toBe(false)\n        expect($('#sort-name-desc').hasClass('desc')).toBe(false)\n        done()\n      })\n      list.sort('name', { order: 'asc' })\n    })\n  })\n\n  describe('Search', function () {\n    it('should trigger searchStart', function (done) {\n      list.on('searchStart', function () {\n        done()\n      })\n      $('#parse-list .search').val('jon')\n      fireKeyup($('#parse-list .search')[0])\n    })\n    it('should trigger searchComplete', function (done) {\n      list.on('searchComplete', function () {\n        done()\n      })\n      $('#parse-list .search').val('jon')\n      fireKeyup($('#parse-list .search')[0])\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/create.test.js",
    "content": "const $ = require('jquery'),\n  List = require('../src/index')\n\ndescribe('Create', function () {\n  describe('With HTML items', function () {\n    var listEl = $(\n      '<div id=\"list\">\\\n      <ul class=\"list\">\\\n        <li><span class=\"name\">Jonny</span></li>\\\n      </ul>\\\n    </div>'\n    )\n\n    $(document.body).append(listEl)\n\n    var list = new List('list', { valueNames: ['name'] })\n\n    it('should contain one item', function () {\n      expect(list.items.length).toEqual(1)\n      expect(listEl.find('li').length).toEqual(1)\n    })\n\n    it('should contain two items', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n      expect(listEl.find('li').length).toEqual(2)\n    })\n\n    listEl.remove()\n  })\n\n  describe('With and element instead of id', function () {\n    var listEl = $(\n      '<div id=\"list\">\\\n      <ul class=\"list\">\\\n        <li><span class=\"name\">Jonny</span></li>\\\n      </ul>\\\n    </div>'\n    )\n\n    $(document.body).append(listEl)\n    var el = document.getElementById('list')\n\n    var list = new List(el, { valueNames: ['name'] })\n\n    it('should contain one item', function () {\n      expect(list.items.length).toEqual(1)\n      expect(listEl.find('li').length).toEqual(1)\n    })\n\n    listEl.remove()\n  })\n\n  describe('Without items and with string template', function () {\n    var listEl = $('<div id=\"list\">\\\n      <ul class=\"list\"></ul>\\\n    </div>')\n\n    $(document.body).append(listEl)\n\n    var list = new List(\n      'list',\n      {\n        valueNames: ['name'],\n        item: '<li><span class=\"name\"></span></li>',\n      },\n      [{ name: 'Jonny' }]\n    )\n\n    it('should contain one item', function () {\n      expect(list.items.length).toEqual(1)\n      expect(listEl.find('li').length).toEqual(1)\n    })\n\n    it('should contain two items', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n      expect(listEl.find('li').length).toEqual(2)\n    })\n\n    listEl.remove()\n  })\n\n  describe('Without items and with string template for table', function () {\n    var listEl = $('<div id=\"list\">\\\n      <table class=\"list\"></table>\\\n    </div>')\n\n    $(document.body).append(listEl)\n\n    var list = new List(\n      'list',\n      {\n        valueNames: ['name'],\n        item: '<tr><span class=\"name\"></span></tr>',\n      },\n      [{ name: 'Jonny' }]\n    )\n\n    it('should contain one item', function () {\n      expect(list.items.length).toEqual(1)\n      expect(listEl.find('tr').length).toEqual(1)\n    })\n\n    it('should contain two items', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n      expect(listEl.find('tr').length).toEqual(2)\n    })\n\n    listEl.remove()\n  })\n\n  describe('Without items and with template function', function () {\n    var listEl = $('<div id=\"list\">\\\n      <ul class=\"list\"></ul>\\\n    </div>')\n\n    $(document.body).append(listEl)\n\n    var list = new List(\n      'list',\n      {\n        valueNames: ['name'],\n        item: function (values) {\n          return `<li data-template-fn-${values.name.toLowerCase()}><span class=\"name\"></span></li>`\n        },\n      },\n      [{ name: 'Jonny' }]\n    )\n\n    it('should contain one item', function () {\n      expect(list.items.length).toEqual(1)\n      expect(listEl.find('li').length).toEqual(1)\n    })\n\n    it('should contain two items', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n      expect(listEl.find('li').length).toEqual(2)\n    })\n\n    it('should get values from items', function () {\n      list.add({ name: 'Egon' })\n      expect(listEl.find('li[data-template-fn-egon]').length).toEqual(1)\n    })\n\n    listEl.remove()\n  })\n\n  describe('without items and or template', function () {\n    it('should throw error on init', function () {\n      var listEl = $('<div id=\"list\">\\\n        <ul class=\"list\"></ul>\\\n      </div>')\n      $(document.body).append(listEl)\n\n      expect(function () {\n        var list = new List('list', {\n          valueNames: ['name'],\n        })\n      }).toThrow()\n      listEl.remove()\n    })\n  })\n\n  describe('Without items and with HTML template', function () {\n    var listEl = $('<div id=\"list\">\\\n      <ul class=\"list\"></ul>\\\n    </div>')\n\n    var templateEl = $('<li id=\"template-item\"><span class=\"name\"></span></li>')\n\n    $(document.body).append(listEl)\n    $(document.body).append(templateEl)\n\n    var list = new List(\n      'list',\n      {\n        valueNames: ['name'],\n        item: 'template-item',\n      },\n      [{ name: 'Jonny' }]\n    )\n\n    it('should contain one item', function () {\n      expect(list.items.length).toEqual(1)\n      expect(listEl.find('li').length).toEqual(1)\n    })\n\n    it('should contain two items', function () {\n      list.add({ name: 'Jonas' })\n      expect(list.items.length).toEqual(2)\n      expect(listEl.find('li').length).toEqual(2)\n    })\n\n    listEl.remove()\n    templateEl.remove()\n  })\n\n  describe('Asyn index with existing list', function () {\n    var listEl = $(\n      '<div id=\"list\">\\\n      <ul class=\"list\">\\\n        <li><span class=\"name\">Jonny</span></li><li><span class=\"name\">Sven</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n        <li><span class=\"name\">Anna</span></li><li><span class=\"name\">Lisa</span></li>\\\n        <li><span class=\"name\">Egon</span></li><li><span class=\"name\">Frida</span></li>\\\n        <li><span class=\"name\">Maj-britt</span></li><li><span class=\"name\">Fredrik</span></li>\\\n        <li><span class=\"name\">Torbjorn</span></li><li><span class=\"name\">Lolzor</span></li>\\\n        <li><span class=\"name\">Sandra</span></li><li><span class=\"name\">Gottfrid</span></li>\\\n        <li><span class=\"name\">Tobias</span></li><li><span class=\"name\">Martina</span></li>\\\n        <li><span class=\"name\">Johannes</span></li><li><span class=\"name\">Ted</span></li>\\\n        <li><span class=\"name\">Malin</span></li><li><span class=\"name\">Filippa</span></li>\\\n        <li><span class=\"name\">Imma</span></li><li><span class=\"name\">Hasse</span></li>\\\n        <li><span class=\"name\">Robert</span></li><li><span class=\"name\">Mona</span></li>\\\n      </ul>\\\n    </div>'\n    )\n\n    it('should contain one item', function (done) {\n      $(document.body).append(listEl)\n      var list = new List('list', {\n        valueNames: ['name'],\n        indexAsync: true,\n        parseComplete: function (list) {\n          expect(listEl.find('li').length).toEqual(162)\n          listEl.remove()\n          done()\n        },\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/defaults.test.js",
    "content": "const $ = require('jquery'),\n  fixture = require('./fixtures')\n\ndescribe('Defaults', function () {\n  var list\n\n  beforeAll(function () {\n    list = fixture.list(['name'], [{ name: 'Jonny' }])\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  it('should have all default attributes', function () {\n    expect(list.items).toBeInstanceOf(Array)\n    expect(list.visibleItems).toBeInstanceOf(Array)\n    expect(list.matchingItems).toBeInstanceOf(Array)\n\n    expect(list.handlers.updated).toBeInstanceOf(Array)\n    expect(list.handlers.searchStart).toBeInstanceOf(Array)\n    expect(list.handlers.searchComplete).toBeInstanceOf(Array)\n    expect(list.handlers.sortStart).toBeInstanceOf(Array)\n    expect(list.handlers.sortComplete).toBeInstanceOf(Array)\n    expect(list.handlers.filterStart).toBeInstanceOf(Array)\n    expect(list.handlers.filterComplete).toBeInstanceOf(Array)\n\n    expect(list.searched).toBe(false)\n    expect(list.filtered).toBe(false)\n    expect(list.i).toEqual(1)\n    expect(list.page).toEqual(10000)\n    expect(list.listClass).toEqual('list')\n    expect(list.sortClass).toEqual('sort')\n    expect(list.searchClass).toEqual('search')\n  })\n\n  it('should have the right elements', function () {\n    expect(list.list).toEqual($('.list')[0])\n    expect(list.listContainer).toEqual($('#list')[0])\n  })\n\n  it('should have all default methods', function () {\n    expect(list.add).toBeInstanceOf(Function)\n    expect(list.remove).toBeInstanceOf(Function)\n    expect(list.get).toBeInstanceOf(Function)\n    expect(list.sort).toBeInstanceOf(Function)\n    expect(list.search).toBeInstanceOf(Function)\n    expect(list.clear).toBeInstanceOf(Function)\n    expect(list.filter).toBeInstanceOf(Function)\n    expect(list.size).toBeInstanceOf(Function)\n    expect(list.show).toBeInstanceOf(Function)\n    expect(list.update).toBeInstanceOf(Function)\n    expect(list.on).toBeInstanceOf(Function)\n  })\n\n  it('should have all helper methods', function () {\n    expect(list.utils.classes).toBeInstanceOf(Function)\n    expect(list.utils.getAttribute).toBeInstanceOf(Function)\n    expect(list.utils.getByClass).toBeInstanceOf(Function)\n    expect(list.utils.naturalSort).toBeInstanceOf(Function)\n    expect(list.utils.events.bind).toBeInstanceOf(Function)\n    expect(list.utils.events.unbind).toBeInstanceOf(Function)\n    expect(list.utils.extend).toBeInstanceOf(Function)\n    expect(list.utils.indexOf).toBeInstanceOf(Function)\n    expect(list.utils.toString).toBeInstanceOf(Function)\n  })\n})\n"
  },
  {
    "path": "__test__/filter.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Filter', function () {\n  var list, jonny, martina, angelica, sebastian, imma, hasse\n\n  beforeAll(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n    jonny = list.get('name', 'Jonny Strömberg')[0]\n    martina = list.get('name', 'Martina Elm')[0]\n    angelica = list.get('name', 'Angelica Abraham')[0]\n    sebastian = list.get('name', 'Sebastian Höglund')[0]\n    imma = list.get('name', 'Imma Grafström')[0]\n    hasse = list.get('name', 'Hasse Strömberg')[0]\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  afterEach(function () {\n    list.filter()\n    list.show(1, 200)\n  })\n\n  describe('Basics', function () {\n    it('should return everyone born after 1988', function () {\n      var result = list.filter(function (item) {\n        return item.values().born > 1988\n      })\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(sebastian)\n    })\n    it('should return everyone born 1986', function () {\n      var result = list.filter(function (item) {\n        return item.values().born == 1986\n      })\n      expect(result.length).toEqual(3)\n      for (var i = 0; i < result.length; i++) {\n        expect(result[i].values().born).toEqual('1986')\n      }\n    })\n  })\n\n  describe('Show and pages', function () {\n    it('should return the visible items', function () {\n      list.show(1, 2)\n      var result = list.filter(function (item) {\n        return item.values().born > 1985\n      })\n      expect(result).toEqual(list.visibleItems)\n    })\n\n    it('should return be 2 visible items and 3 matching', function () {\n      list.show(1, 2)\n      var result = list.filter(function (item) {\n        return item.values().born > 1985\n      })\n      expect(result.length).toEqual(2)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(list.matchingItems.length).toEqual(4)\n    })\n\n    describe('Specific items', function () {\n      beforeEach(function () {\n        list.show(1, 2)\n        var result = list.filter(function (item) {\n          return item.values().born > 1985\n        })\n      })\n      it('should match jonny', function () {\n        expect(jonny.matching()).toBe(true)\n        expect(jonny.filtered).toBe(true)\n        expect(jonny.visible()).toBe(true)\n      })\n      it('should match martina', function () {\n        expect(martina.matching()).toBe(true)\n        expect(martina.filtered).toBe(true)\n        expect(martina.visible()).toBe(true)\n      })\n      it('should match but not show angelica', function () {\n        expect(angelica.matching()).toBe(true)\n        expect(angelica.filtered).toBe(true)\n        expect(angelica.visible()).toBe(false)\n      })\n      it('should match but not show sebastian', function () {\n        expect(sebastian.matching()).toBe(true)\n        expect(sebastian.filtered).toBe(true)\n        expect(sebastian.visible()).toBe(false)\n      })\n      it('should not match imma', function () {\n        expect(imma.matching()).toBe(false)\n        expect(imma.filtered).toBe(false)\n        expect(imma.visible()).toBe(false)\n      })\n      it('should not match hasse', function () {\n        expect(hasse.matching()).toBe(false)\n        expect(hasse.filtered).toBe(false)\n        expect(hasse.visible()).toBe(false)\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/fixtures-fuzzysearch.js",
    "content": "const $ = require('jquery')\n\nvar fixtureFuzzysearch = {\n  list: function (valueNames) {\n    var listHtml = $('<div id=\"list-fuzzy-search\"><input class=\"fuzzy-search\" /><ul class=\"list\"></ul></div>'),\n      item = ''\n\n    item = '<li>'\n    for (var i = 0; i < valueNames.length; i++) {\n      item += '<span class=\"' + valueNames[i] + '\"</span>'\n    }\n    item += '</li>'\n\n    $(document.body).append(listHtml)\n\n    return item\n  },\n  removeList: function () {\n    $('#list-fuzzy-search').remove()\n  },\n  i1: { name: 'Guybrush Threepwood' },\n  i2: { name: 'Manny Calavera' },\n  i3: { name: 'Bernard Bernoulli' },\n  i4: { name: 'LeChuck' },\n  i5: { name: 'Elaine Marley-Threepwood' },\n  i6: { name: 'Purple Tentacle' },\n  i7: { name: 'Adrian Ripburger' },\n  i8: { name: 'Bobbin Threadbare' },\n  i9: { name: 'Murray the Demonic Skull' },\n  i10: { name: 'Zak McKracken' },\n}\nfixtureFuzzysearch.all = [\n  fixtureFuzzysearch.i1,\n  fixtureFuzzysearch.i2,\n  fixtureFuzzysearch.i3,\n  fixtureFuzzysearch.i4,\n  fixtureFuzzysearch.i5,\n  fixtureFuzzysearch.i6,\n  fixtureFuzzysearch.i7,\n  fixtureFuzzysearch.i8,\n  fixtureFuzzysearch.i9,\n  fixtureFuzzysearch.i10,\n]\n\nmodule.exports = fixtureFuzzysearch\n"
  },
  {
    "path": "__test__/fixtures-pagination.js",
    "content": "const $ = require('jquery')\n\nvar fixturePagination = {\n  list: function (valueNames) {\n    var listHtml = $('<div id=\"list-pagination\"><ul class=\"list\"></ul><ul class=\"pagination\"></ul></div>'),\n      item = ''\n\n    item = '<li>'\n    for (var i = 0; i < valueNames.length; i++) {\n      item += '<span class=\"' + valueNames[i] + '\"</span>'\n    }\n    item += '</li>'\n\n    $(document.body).append(listHtml)\n\n    return item\n  },\n  removeList: function () {\n    $('#list-pagination').remove()\n  },\n  jonny: {\n    name: 'Jonny Strömberg',\n    born: '1986',\n  },\n  martina: {\n    name: 'Martina Elm',\n    born: '1986',\n  },\n  angelica: {\n    name: 'Angelica Abraham',\n    born: '1986',\n  },\n  sebastian: {\n    name: 'Sebastian Höglund',\n    born: '1989',\n  },\n  imma: {\n    name: 'Imma Grafström',\n    born: '1953',\n  },\n  hasse: {\n    name: 'Hasse Strömberg',\n    born: '1955',\n  },\n  fredrik: {\n    name: 'Fredrik Martinsson',\n    born: '1987',\n  },\n  jonas: {\n    name: 'Jonas Arnklint',\n    born: '1987',\n  },\n  egon: {\n    name: 'Egon Östgren',\n    born: '1983',\n  },\n  lars: {\n    name: 'Lars Larsson',\n    born: '1992',\n  },\n  bertil: {\n    name: 'Bertil Cool',\n    born: '1943',\n  },\n  ture: {\n    name: 'Ture Tur',\n    born: '1965',\n  },\n  anders: {\n    name: 'Anders',\n    born: '1987',\n  },\n  anna: {\n    name: 'Anna',\n    born: '1987',\n  },\n  matilda: {\n    name: 'Matilda',\n    born: '1983',\n  },\n  li: {\n    name: 'Li',\n    born: '1992',\n  },\n  asa: {\n    name: 'Åsa',\n    born: '1943',\n  },\n  gun: {\n    name: 'Gun',\n    born: '1965',\n  },\n}\nfixturePagination.all = [\n  fixturePagination.jonny,\n  fixturePagination.martina,\n  fixturePagination.angelica,\n  fixturePagination.sebastian,\n  fixturePagination.imma,\n  fixturePagination.hasse,\n  fixturePagination.fredrik,\n  fixturePagination.jonas,\n  fixturePagination.egon,\n  fixturePagination.lars,\n  fixturePagination.bertil,\n  fixturePagination.ture,\n  fixturePagination.anders,\n  fixturePagination.anna,\n  fixturePagination.matilda,\n  fixturePagination.li,\n  fixturePagination.asa,\n  fixturePagination.gun,\n]\n\nmodule.exports = fixturePagination\n"
  },
  {
    "path": "__test__/fixtures.js",
    "content": "const $ = require('jquery'),\n  List = require('../src/index')\n\nvar fixture = {\n  list: function (valueNames, items) {\n    var listHtml = $('<div id=\"list\"><ul class=\"list\"></ul></div>'),\n      item = ''\n\n    item = '<li>'\n    for (var i = 0; i < valueNames.length; i++) {\n      item += '<span class=\"' + valueNames[i] + '\"</span>'\n    }\n    item += '</li>'\n\n    $(document.body).append(listHtml)\n\n    items = items || []\n\n    return new List(\n      'list',\n      {\n        valueNames: valueNames,\n        item: item,\n      },\n      items\n    )\n  },\n  removeList: function () {\n    $('#list').remove()\n  },\n  jonny: {\n    name: 'Jonny Strömberg',\n    born: '1986',\n  },\n  martina: {\n    name: 'Martina Elm',\n    born: '1986',\n  },\n  angelica: {\n    name: 'Angelica Abraham',\n    born: '1986',\n  },\n  sebastian: {\n    name: 'Sebastian Höglund',\n    born: '1989',\n  },\n  imma: {\n    name: 'Imma Grafström',\n    born: '1953',\n  },\n  hasse: {\n    name: 'Hasse Strömberg',\n    born: '1955',\n  },\n}\nfixture.all = [fixture.jonny, fixture.martina, fixture.angelica, fixture.sebastian, fixture.imma, fixture.hasse]\n\nmodule.exports = fixture\n"
  },
  {
    "path": "__test__/fuzzysearch.test.js",
    "content": "const $ = require('jquery'),\n  fixtureFuzzysearch = require('./fixtures-fuzzysearch'),\n  List = require('../src/index')\n\nfunction fireKeyup(el) {\n  if (document.createEvent) {\n    var evObj\n    if (window.KeyEvent) {\n      evObj = document.createEvent('KeyEvents')\n      evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0)\n    } else {\n      evObj = document.createEvent('UIEvents')\n      evObj.initUIEvent('keyup', true, true, window, 1)\n    }\n    el.dispatchEvent(evObj)\n  } else if (document.createEventObject) {\n    el.fireEvent('onkeyup')\n  } else {\n    // IE 5.0, seriously? :)\n  }\n}\n\ndescribe('Fuzzy Search', function () {\n  var list, itemHTML, pagination\n\n  beforeEach(function () {\n    itemHTML = fixtureFuzzysearch.list(['name', 'born'])\n    list = new List(\n      'list-fuzzy-search',\n      {\n        valueNames: ['name', 'born'],\n        item: itemHTML,\n      },\n      fixtureFuzzysearch.all\n    )\n  })\n\n  afterEach(function () {\n    fixtureFuzzysearch.removeList()\n  })\n\n  it('should have default attribute', function () {\n    expect(list.fuzzySearch).toBeInstanceOf(Function)\n  })\n\n  it('should find result', function () {\n    list.fuzzySearch('guybrush')\n    expect(list.matchingItems.length).toBe(1)\n  })\n\n  it('should find result', function () {\n    list.fuzzySearch('g thre')\n    expect(list.matchingItems.length).toBe(1)\n  })\n\n  it('should find result', function () {\n    list.fuzzySearch('thre')\n    expect(list.matchingItems.length).toBe(4)\n  })\n\n  describe('Search field', function () {\n    it('should trigger searchStart', function (done) {\n      list.on('searchStart', function () {\n        done()\n      })\n      $('#list-fuzzy-search .fuzzy-search').val('angelica')\n      fireKeyup($('#list-fuzzy-search .fuzzy-search')[0])\n    })\n\n    it('should trigger searchComplete', function (done) {\n      list.on('searchComplete', function () {\n        done()\n      })\n      $('#list-fuzzy-search .fuzzy-search').val('angelica')\n      fireKeyup($('#list-fuzzy-search .fuzzy-search')[0])\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/item.test.js",
    "content": "const $ = require('jquery'),\n  fixture = require('./fixtures')\n\ndescribe('Item', function () {\n  var list, item\n\n  beforeAll(function () {\n    list = fixture.list(\n      ['name', 'born', 'doin'],\n      [\n        {\n          name: 'Jonny',\n          born: '1986',\n          doin: 'Living the dream',\n        },\n      ]\n    )\n    item = list.get('name', 'Jonny')[0]\n  })\n\n  beforeEach(function () {\n    list.search()\n    list.filter()\n    list.show(1, 200)\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  describe('Defaults', function () {\n    it('should have all default attributes', function () {\n      expect(item.found).toBe(false)\n      expect(item.filtered).toBe(false)\n    })\n\n    it('should have the right elements', function () {\n      expect(item.elm).toEqual($('#list li')[0])\n    })\n\n    it('should have all default methods', function () {\n      expect(item.hide).toBeInstanceOf(Function)\n      expect(item.show).toBeInstanceOf(Function)\n      expect(item.values).toBeInstanceOf(Function)\n      expect(item.matching).toBeInstanceOf(Function)\n      expect(item.visible).toBeInstanceOf(Function)\n    })\n  })\n\n  describe('Values()', function () {\n    it('should have the right values', function () {\n      expect(item.values()).toEqual({\n        name: 'Jonny',\n        born: '1986',\n        doin: 'Living the dream',\n      })\n    })\n    it('should be able to change one value', function () {\n      expect(item.values().name).toBe('Jonny')\n      item.values({ name: 'Egon' })\n      expect(item.values().name).toBe('Egon')\n    })\n    it('should be able to change many value', function () {\n      expect(item.values()).toEqual({\n        name: 'Egon',\n        born: '1986',\n        doin: 'Living the dream',\n      })\n      item.values({\n        name: 'Sven',\n        born: '1801',\n        doin: 'Is dead',\n      })\n      expect(item.values()).toEqual({\n        name: 'Sven',\n        born: '1801',\n        doin: 'Is dead',\n      })\n    })\n  })\n\n  describe('Hide, show, visible', function () {\n    it('should be hidden', function () {\n      expect($('#list li').length).toEqual(1)\n      item.hide()\n      expect(item.visible()).toBe(false)\n      expect($('#list li').length).toEqual(0)\n    })\n    it('should be visible', function () {\n      item.hide()\n      expect($('#list li').length).toEqual(0)\n      item.show()\n      expect(item.visible()).toBe(true)\n      expect($('#list li').length).toEqual(1)\n    })\n  })\n\n  describe('Matching, found, filtered', function () {\n    describe('Searching', function () {\n      it('should not be visible, match, found or filtered', function () {\n        list.search('Fredrik')\n        expect(item.matching()).toBe(false)\n        expect(item.found).toBe(false)\n        expect(item.filtered).toBe(false)\n        expect(item.visible()).toBe(false)\n      })\n      it('should be visble, match and found but not filterd', function () {\n        var result = list.search('Sven')\n        expect(item.matching()).toBe(true)\n        expect(item.found).toBe(true)\n        expect(item.filtered).toBe(false)\n        expect(item.visible()).toBe(true)\n      })\n      it('reset: should be visible and matching but not found or filtered', function () {\n        list.search()\n        expect(item.matching()).toBe(true)\n        expect(item.found).toBe(false)\n        expect(item.filtered).toBe(false)\n        expect(item.visible()).toBe(true)\n      })\n    })\n    describe('Filtering', function () {\n      it('should not be visble, match, found or filtered', function () {\n        list.filter(function (item) {\n          return item.values().name == 'Fredrik'\n        })\n        expect(item.matching()).toBe(false)\n        expect(item.found).toBe(false)\n        expect(item.filtered).toBe(false)\n        expect(item.visible()).toBe(false)\n      })\n      it('should be visble, match and filtered but not found', function () {\n        list.filter(function (item) {\n          return item.values().name == 'Sven'\n        })\n        expect(item.matching()).toBe(true)\n        expect(item.found).toBe(false)\n        expect(item.filtered).toBe(true)\n        expect(item.visible()).toBe(true)\n      })\n      it('reset: should be visble and match but not filtered or found', function () {\n        list.filter()\n        expect(item.matching()).toBe(true)\n        expect(item.found).toBe(false)\n        expect(item.filtered).toBe(false)\n        expect(item.visible()).toBe(true)\n      })\n    })\n  })\n\n  fixture.removeList()\n})\n"
  },
  {
    "path": "__test__/off.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Off', function () {\n  var list\n\n  beforeAll(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  describe('General', function () {\n    it('should be remove added handler', function (done) {\n      var updated = function (list) {\n        expect(list.handlers.updated.length).toEqual(1)\n        list.off('updated', updated)\n        expect(list.handlers.updated.length).toEqual(0)\n        done()\n      }\n      list.on('updated', updated)\n      list.search('jonny')\n    })\n\n    it('should not remove unnamed handlers', function (done) {\n      var searchComplete = function (list) {\n        expect(list.handlers.searchComplete.length).toEqual(3)\n        list.off('searchComplete', function () {})\n        list.off('searchComplete', searchComplete)\n        expect(list.handlers.searchComplete.length).toEqual(2)\n        done()\n      }\n      list.on('searchComplete', function () {})\n      list.on('searchComplete', searchComplete)\n      list.on('searchComplete', function () {})\n      list.search('jonny')\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/on.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('On', function () {\n  var list\n\n  beforeEach(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n  })\n\n  afterEach(function () {\n    fixture.removeList()\n  })\n\n  describe('Updated', function () {\n    it('should be triggered after search', function (done) {\n      list.on('updated', function (list) {\n        done()\n      })\n      list.search('jonny')\n    })\n    it('should be triggered after sort', function (done) {\n      list.on('updated', function (list) {\n        done()\n      })\n      list.sort('name')\n    })\n    it('should be triggered after filter', function (done) {\n      list.on('updated', function (list) {\n        done()\n      })\n      list.filter(function () {\n        return true\n      })\n    })\n    it('should be triggered after show', function (done) {\n      list.on('updated', function (list) {\n        done()\n      })\n      list.show(1, 10)\n    })\n\n    it('should be triggered after add', function (done) {\n      list.on('updated', function (list) {\n        done()\n      })\n      list.add({ name: 'Hej' })\n    })\n    it('should be triggered after remove', function (done) {\n      list.on('updated', function (list) {\n        done()\n      })\n      list.remove('name', 'Jonny')\n    })\n  })\n\n  describe('Multiple handlers', function () {\n    it('should be trigger both handlers', function (done) {\n      var done1 = false,\n        done2 = false,\n        isDone = function () {\n          if (done1 && done2) {\n            done()\n          }\n        }\n\n      list.on('updated', function (list) {\n        done1 = true\n        isDone()\n      })\n      list.on('updated', function (list) {\n        done2 = true\n        isDone()\n      })\n      list.search('jonny')\n    })\n  })\n\n  describe('Search', function () {\n    it('should be triggered before and after search', function (done) {\n      var done1 = false\n      list.on('searchStart', function (list) {\n        done1 = true\n      })\n      list.on('searchComplete', function (list) {\n        if (done1) {\n          done()\n        }\n      })\n      list.search('jonny')\n    })\n  })\n\n  describe('Sort', function () {\n    it('should be triggered before and after sort', function (done) {\n      var done1 = false\n      list.on('sortStart', function (list) {\n        done1 = true\n      })\n      list.on('sortComplete', function (list) {\n        if (done1) {\n          done()\n        }\n      })\n      list.sort('name')\n    })\n  })\n\n  describe('Filter', function () {\n    it('should be triggered before and after filter', function (done) {\n      var done1 = false\n      list.on('filterStart', function (list) {\n        done1 = true\n      })\n      list.on('filterComplete', function (list) {\n        if (done1) {\n          done()\n        }\n      })\n      list.filter(function () {\n        return true\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/pagination.test.js",
    "content": "const $ = require('jquery'),\n  fixturePagination = require('./fixtures-pagination'),\n  List = require('../src/index')\n\ndescribe('Pagination', function () {\n  describe('Default settings, innerWindow: 2, outerWindow: 0, left: 0, right: 0', function () {\n    var list, itemHTML, pagination\n\n    beforeAll(function () {\n      itemHTML = fixturePagination.list(['name'])\n      list = new List(\n        'list-pagination',\n        {\n          valueNames: ['name'],\n          item: itemHTML,\n          page: 2,\n          pagination: true,\n        },\n        fixturePagination.all\n      )\n\n      pagination = $('.pagination')\n    })\n\n    afterAll(function () {\n      fixturePagination.removeList()\n    })\n\n    it('should have default settings', function () {\n      expect(pagination.find('a').length).toEqual(4)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(4)).toEqual(undefined)\n    })\n\n    it('should show same pages for show(7,2) and show(8,2)', function () {\n      list.show(7, 2)\n      expect(pagination.find('a').length).toEqual(7)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('4')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('5')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('6')\n      expect(pagination.find('a').get(6).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(7)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should show same pages for show(7,2) and show(8,2)', function () {\n      list.show(8, 2)\n      expect(pagination.find('a').length).toEqual(7)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('4')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('5')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('6')\n      expect(pagination.find('a').get(6).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(7)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should test show(14,2)', function () {\n      list.show(14, 2)\n      expect(pagination.find('a').length).toEqual(6)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('5')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('6')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('7')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('8')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(6)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should show last page with show(17,2)', function () {\n      list.show(17, 2)\n      expect(pagination.find('a').length).toEqual(4)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('7')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('8')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(4)).toEqual(undefined)\n      expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n    })\n\n    it('should handle page = 0', function () {\n      expect(list.listContainer.style.display).toBe('')\n      list.show(0, 0)\n      expect(list.listContainer.style.display).toBe('none')\n      list.show(1, 1)\n      expect(list.listContainer.style.display).toBe('block')\n    })\n  })\n\n  describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 0, right: 0', function () {\n    var list, itemHTML, pagination\n\n    beforeAll(function () {\n      itemHTML = fixturePagination.list(['name'])\n      list = new List(\n        'list-pagination',\n        {\n          valueNames: ['name'],\n          item: itemHTML,\n          page: 2,\n          pagination: {\n            innerWindow: 1,\n            outerWindow: 1,\n          },\n        },\n        fixturePagination.all\n      )\n\n      pagination = $('.pagination')\n    })\n\n    afterAll(function () {\n      fixturePagination.removeList()\n    })\n\n    it('should have default settings', function () {\n      expect(pagination.find('a').length).toEqual(4)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(4)).toEqual(undefined)\n    })\n\n    it('should test show(7,2)', function () {\n      list.show(7, 2)\n      expect(pagination.find('a').length).toEqual(7)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('4')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('5')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(6).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(7)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should test show(14,2)', function () {\n      list.show(14, 2)\n      expect(pagination.find('a').length).toEqual(6)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('6')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('7')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('8')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(6)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should show last page with show(17,2)', function () {\n      list.show(17, 2)\n      expect(pagination.find('a').length).toEqual(4)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('8')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(4)).toEqual(undefined)\n      expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n    })\n  })\n\n  describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 2, right: 1', function () {\n    var list, itemHTML, pagination\n\n    beforeAll(function () {\n      itemHTML = fixturePagination.list(['name'])\n      list = new List(\n        'list-pagination',\n        {\n          valueNames: ['name'],\n          item: itemHTML,\n          page: 2,\n          pagination: {\n            innerWindow: 1,\n            outerWindow: 1,\n            left: 2,\n            right: 1,\n          },\n        },\n        fixturePagination.all\n      )\n\n      pagination = $('.pagination')\n    })\n\n    afterAll(function () {\n      fixturePagination.removeList()\n    })\n\n    it('should have default settings', function () {\n      expect(pagination.find('a').length).toEqual(4)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(4)).toEqual(undefined)\n    })\n\n    it('should test show(7,2)', function () {\n      list.show(7, 2)\n      expect(pagination.find('a').length).toEqual(7)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('4')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('5')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(6).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(7)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should test show(12,2)', function () {\n      list.show(12, 2)\n      expect(pagination.find('a').length).toEqual(8)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('5')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('6')\n      expect(pagination.find('a').get(5).innerHTML).toEqual('7')\n      expect(pagination.find('a').get(6).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(7).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(8)).toEqual(undefined)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('li').get(5)).hasClass('active')).toEqual(false)\n    })\n    it('should show last page with show(17,2)', function () {\n      list.show(17, 2)\n      expect(pagination.find('a').length).toEqual(5)\n      expect(pagination.find('a').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('a').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('a').get(2).innerHTML).toEqual('...')\n      expect(pagination.find('a').get(3).innerHTML).toEqual('8')\n      expect(pagination.find('a').get(4).innerHTML).toEqual('9')\n      expect(pagination.find('a').get(5)).toEqual(undefined)\n      expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true)\n    })\n  })\n\n  describe('Custom settings, pagination: { item: \"<button><span class=page></span></button>\" }', function () {\n    var list, itemHTML, pagination\n\n    beforeAll(function () {\n      itemHTML = fixturePagination.list(['name'])\n      list = new List(\n        'list-pagination',\n        {\n          valueNames: ['name'],\n          item: itemHTML,\n          page: 2,\n          pagination: {\n            item: '<button><span class=page></span></button>',\n          },\n        },\n        fixturePagination.all\n      )\n\n      pagination = $('.pagination')\n    })\n\n    afterAll(function () {\n      fixturePagination.removeList()\n    })\n\n    it('should have default settings', function () {\n      expect(pagination.find('span').length).toEqual(4)\n      expect(pagination.find('span').get(0).innerHTML).toEqual('1')\n      expect(pagination.find('span').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('span').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('span').get(3).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(4)).toEqual(undefined)\n    })\n\n    it('should show same pages for show(7,2) and show(8,2)', function () {\n      list.show(7, 2)\n      expect(pagination.find('span').length).toEqual(7)\n      expect(pagination.find('span').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('span').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('span').get(3).innerHTML).toEqual('4')\n      expect(pagination.find('span').get(4).innerHTML).toEqual('5')\n      expect(pagination.find('span').get(5).innerHTML).toEqual('6')\n      expect(pagination.find('span').get(6).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(7)).toEqual(undefined)\n      expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should show same pages for show(7,2) and show(8,2)', function () {\n      list.show(8, 2)\n      expect(pagination.find('span').length).toEqual(7)\n      expect(pagination.find('span').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(1).innerHTML).toEqual('2')\n      expect(pagination.find('span').get(2).innerHTML).toEqual('3')\n      expect(pagination.find('span').get(3).innerHTML).toEqual('4')\n      expect(pagination.find('span').get(4).innerHTML).toEqual('5')\n      expect(pagination.find('span').get(5).innerHTML).toEqual('6')\n      expect(pagination.find('span').get(6).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(7)).toEqual(undefined)\n      expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should test show(14,2)', function () {\n      list.show(14, 2)\n      expect(pagination.find('span').length).toEqual(6)\n      expect(pagination.find('span').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(1).innerHTML).toEqual('5')\n      expect(pagination.find('span').get(2).innerHTML).toEqual('6')\n      expect(pagination.find('span').get(3).innerHTML).toEqual('7')\n      expect(pagination.find('span').get(4).innerHTML).toEqual('8')\n      expect(pagination.find('span').get(5).innerHTML).toEqual('9')\n      expect(pagination.find('span').get(6)).toEqual(undefined)\n      expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true)\n      expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false)\n    })\n\n    it('should show last page with show(17,2)', function () {\n      list.show(17, 2)\n      expect(pagination.find('span').length).toEqual(4)\n      expect(pagination.find('span').get(0).innerHTML).toEqual('...')\n      expect(pagination.find('span').get(1).innerHTML).toEqual('7')\n      expect(pagination.find('span').get(2).innerHTML).toEqual('8')\n      expect(pagination.find('span').get(3).innerHTML).toEqual('9')\n      expect(pagination.find('span').get(4)).toEqual(undefined)\n      expect($(pagination.find('button').get(1)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false)\n      expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true)\n    })\n\n    it('should handle page = 0', function () {\n      expect(list.listContainer.style.display).toBe('')\n      list.show(0, 0)\n      expect(list.listContainer.style.display).toBe('none')\n      list.show(1, 1)\n      expect(list.listContainer.style.display).toBe('block')\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/parse.test.js",
    "content": "const $ = require('jquery'),\n  List = require('../src/index')\n\ndescribe('Parse', function () {\n  describe('Parse class', function () {\n    var list\n    beforeEach(function () {\n      $('body').append(\n        $(\n          '<div id=\"parse-list\">\\\n        <div class=\"list\">\\\n          <div><span class=\"name\">Jonny</span><span class=\"born\">1986</span></div>\\\n          <div><span class=\"name\">Jocke</span><span class=\"born\">1985</span></div>\\\n        </div>\\\n      </div>'\n        )\n      )\n\n      list = new List('parse-list', {\n        valueNames: ['name', 'born'],\n      })\n    })\n\n    afterEach(function () {\n      $('#parse-list').remove()\n    })\n\n    it('should have two items', function () {\n      expect(list.items.length).toEqual(2)\n      expect(list.items[0].values().name).toEqual('Jonny')\n      expect(list.items[1].values().name).toEqual('Jocke')\n    })\n    it('should add item to parsed list', function () {\n      list.add({ name: 'Sven', born: 1950 })\n      expect(list.items.length).toEqual(3)\n      expect(list.items[0].values().name).toEqual('Jonny')\n      expect(list.items[1].values().name).toEqual('Jocke')\n      expect(list.items[2].values().name).toEqual('Sven')\n      expect(list.items[0].values().born).toEqual('1986')\n      expect(list.items[2].values().born).toEqual(1950)\n      var el = $($('#parse-list').find('.list div')[2])\n      expect(el.find('span').length).toEqual(2)\n      expect(el.find('span.name').text()).toEqual('Sven')\n      expect(el.find('span.born').text()).toEqual('1950')\n    })\n    it('should parsed value always be string while added could be number', function () {\n      list.add({ name: 'Sven', born: 1950 })\n      expect(list.items[0].values().born).toEqual('1986')\n      expect(list.items[0].values().born).not.toEqual(1986)\n      expect(list.items[2].values().born).not.toEqual('1950')\n      expect(list.items[2].values().born).toEqual(1950)\n    })\n  })\n\n  describe('Parse data', function () {\n    var list\n\n    beforeEach(function () {\n      $('body').append(\n        $(\n          '<div id=\"parse-list\">\\\n        <div class=\"list\">\\\n          <div data-id=\"1\">\\\n            <a href=\"http://lol.com\" class=\"link name\">Jonny</a>\\\n            <span class=\"born timestamp\" data-timestamp=\"54321\">1986</span>\\\n            <img class=\"image\" src=\"usage/boba.jpeg\">\\\n            <input class=\"foo\" value=\"Bar\">\\\n          </div>\\\n          <div data-id=\"2\">\\\n            <a href=\"http://lol.com\" class=\"link name\">Jocke</a>\\\n            <span class=\"born timestamp\" data-timestamp=\"12345\">1985</span>\\\n            <img class=\"image\" src=\"usage/leia.jpeg\">\\\n            <input class=\"foo child\" value=\"Car\">\\\n          </div>\\\n        </div>\\\n      </div>'\n        )\n      )\n\n      list = new List('parse-list', {\n        valueNames: [\n          'name',\n          'born',\n          { data: ['id'] },\n          { attr: 'src', name: 'image' },\n          { attr: 'href', name: 'link' },\n          { attr: 'value', name: 'foo' },\n          { attr: 'data-timestamp', name: 'timestamp' },\n        ],\n      })\n    })\n\n    afterEach(function () {\n      $('#parse-list').remove()\n    })\n\n    it('should get values from class, data, src, value and child els data-attribute', function () {\n      expect(list.items.length).toEqual(2)\n      var jonny = list.items[0].values()\n      expect(jonny.name).toEqual('Jonny')\n      expect(jonny.born).toEqual('1986')\n      expect(jonny.id).toEqual('1')\n      expect(jonny.image).toEqual('usage/boba.jpeg')\n      expect(jonny.timestamp).toEqual('54321')\n      expect(jonny.foo).toEqual('Bar')\n    })\n    it('should add item to list with class, data and src', function () {\n      list.add({\n        name: 'Sven',\n        born: 1950,\n        id: 4,\n        image: 'usage/rey.jpeg',\n        link: 'localhost',\n        timestamp: '1337',\n        foo: 'hej',\n      })\n      expect(list.items.length).toEqual(3)\n      var sven = list.items[2].values()\n      expect(sven.name).toEqual('Sven')\n      expect(sven.born).toEqual(1950)\n      expect(sven.id).toEqual(4)\n      expect(sven.image).toEqual('usage/rey.jpeg')\n      expect(sven.link).toEqual('localhost')\n      expect(sven.timestamp).toEqual('1337')\n      expect(sven.foo).toEqual('hej')\n      var el = $($('#parse-list').find('.list div')[2])\n      expect(el.data('id')).toEqual(4)\n      expect(el.find('.name').text()).toEqual('Sven')\n      expect(el.find('.born').text()).toEqual('1950')\n      expect(el.find('.image').attr('src')).toEqual('usage/rey.jpeg')\n      expect(el.find('.link').attr('href')).toEqual('localhost')\n      expect(el.find('.timestamp').data('timestamp')).toEqual(1337)\n      expect(el.find('.foo').val()).toEqual('hej')\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/re-index.test.js",
    "content": "const $ = require('jquery'),\n  fixture = require('./fixtures')\n\ndescribe('ReIndex', function () {\n  var list, jonny, martina, angelica, sebastian, imma, hasse\n\n  beforeAll(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  afterEach(function () {\n    list.show(1, 200)\n  })\n  it('should return everyone born after 1988', function () {\n    expect(list.toJSON()).toEqual([\n      { name: 'Jonny Strömberg', born: '1986' },\n      { name: 'Martina Elm', born: '1986' },\n      { name: 'Angelica Abraham', born: '1986' },\n      { name: 'Sebastian Höglund', born: '1989' },\n      { name: 'Imma Grafström', born: '1953' },\n      { name: 'Hasse Strömberg', born: '1955' },\n    ])\n    var newHtml = '<li><span class=\"name\">Sven</span><span class=\"born\">2013</span>'\n    newHtml = newHtml + '<li><span class=\"name\">Anna</span><span class=\"born\">3043</span>'\n    $(list.list).html(newHtml)\n    list.reIndex()\n    expect(list.toJSON()).toEqual([\n      { name: 'Sven', born: '2013' },\n      { name: 'Anna', born: '3043' },\n    ])\n  })\n})\n"
  },
  {
    "path": "__test__/search-filter.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Search and filter', function () {\n  var list, jonny, martina, angelica, sebastian, imma, hasse\n\n  beforeAll(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n\n    jonny = list.get('name', 'Jonny Strömberg')[0]\n    martina = list.get('name', 'Martina Elm')[0]\n    angelica = list.get('name', 'Angelica Abraham')[0]\n    sebastian = list.get('name', 'Sebastian Höglund')[0]\n    imma = list.get('name', 'Imma Grafström')[0]\n    hasse = list.get('name', 'Hasse Strömberg')[0]\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  afterEach(function () {\n    list.search()\n    list.filter()\n  })\n\n  describe('Search with filter', function () {\n    it('should find everyone born 1986', function () {\n      list.filter(function (item) {\n        return item.values().born == '1986'\n      })\n      expect(list.matchingItems.length).toEqual(3)\n      expect(jonny.matching()).toBe(true)\n      expect(martina.matching()).toBe(true)\n      expect(angelica.matching()).toBe(true)\n      expect(sebastian.matching()).toBe(false)\n      expect(imma.matching()).toBe(false)\n      expect(hasse.matching()).toBe(false)\n    })\n    it('should find everyone born 1986 and containes \"ö\"', function () {\n      list.filter(function (item) {\n        return item.values().born == '1986'\n      })\n      list.search('ö')\n      expect(list.matchingItems.length).toEqual(1)\n      expect(jonny.matching()).toBe(true)\n      expect(martina.matching()).toBe(false)\n      expect(angelica.matching()).toBe(false)\n      expect(sebastian.matching()).toBe(false)\n      expect(imma.matching()).toBe(false)\n      expect(hasse.matching()).toBe(false)\n    })\n    it('should find everyone with a \"ö\"', function () {\n      list.filter(function (item) {\n        return item.values().born == '1986'\n      })\n      list.search('ö')\n      list.filter()\n      expect(list.matchingItems.length).toEqual(4)\n      expect(jonny.matching()).toBe(true)\n      expect(martina.matching()).toBe(false)\n      expect(angelica.matching()).toBe(false)\n      expect(sebastian.matching()).toBe(true)\n      expect(imma.matching()).toBe(true)\n      expect(hasse.matching()).toBe(true)\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/search.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Search', function () {\n  var list, jonny, martina, angelica, sebastian, imma, hasse\n\n  beforeEach(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n\n    jonny = list.get('name', 'Jonny Strömberg')[0]\n    martina = list.get('name', 'Martina Elm')[0]\n    angelica = list.get('name', 'Angelica Abraham')[0]\n    sebastian = list.get('name', 'Sebastian Höglund')[0]\n    imma = list.get('name', 'Imma Grafström')[0]\n    hasse = list.get('name', 'Hasse Strömberg')[0]\n  })\n\n  afterEach(function () {\n    fixture.removeList()\n  })\n\n  describe('Case-sensitive', function () {\n    it('should not be case-sensitive', function () {\n      var result = list.search('jonny')\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(jonny)\n    })\n  })\n\n  describe('Number of results', function () {\n    it('should find jonny, martina, angelice', function () {\n      var result = list.search('1986')\n      expect(result.length).toEqual(3) // 3!!\n      expect(jonny.matching()).toBe(true)\n      expect(martina.matching()).toBe(true)\n      expect(angelica.matching()).toBe(true)\n      expect(sebastian.matching()).toBe(false)\n      expect(imma.matching()).toBe(false)\n      expect(hasse.matching()).toBe(false)\n    })\n    it('should find all with utf-8 char ö', function () {\n      var result = list.search('ö')\n      expect(result.length).toEqual(4) // 4!!\n      expect(jonny.matching()).toBe(true)\n      expect(martina.matching()).toBe(false)\n      expect(angelica.matching()).toBe(false)\n      expect(sebastian.matching()).toBe(true)\n      expect(imma.matching()).toBe(true)\n      expect(hasse.matching()).toBe(true)\n    })\n    it('should not break with weird searches', function () {\n      expect(function () {\n        list.search(undefined)\n      }).not.toThrow()\n      expect(function () {\n        list.search(null)\n      }).not.toThrow()\n      expect(function () {\n        list.search(0)\n      }).not.toThrow()\n      expect(function () {\n        list.search(function () {})\n      }).not.toThrow()\n      expect(function () {\n        list.search({ foo: 'bar' })\n      }).not.toThrow()\n    })\n    it('should not break with weird values', function () {\n      jonny.values({ name: undefined })\n      martina.values({ name: null })\n      angelica.values({ name: 0 })\n      sebastian.values({ name: function () {} })\n      imma.values({ name: { foo: 'bar' } })\n\n      expect(function () {\n        list.search('jonny')\n      }).not.toThrow()\n      expect(function () {\n        list.search(undefined)\n      }).not.toThrow()\n      expect(function () {\n        list.search(null)\n      }).not.toThrow()\n      expect(function () {\n        list.search(0)\n      }).not.toThrow()\n      expect(function () {\n        list.search(function () {})\n      }).not.toThrow()\n      expect(function () {\n        list.search({ foo: 'bar' })\n      }).not.toThrow()\n    })\n  })\n\n  describe('Default search columns', function () {\n    it('should find in the default match column', function () {\n      list.searchColumns = ['name']\n      var result = list.search('jonny')\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(jonny)\n    })\n    it('should not find in the default match column', function () {\n      list.searchColumns = ['born']\n      var result = list.search('jonny')\n      expect(result.length).toEqual(0)\n    })\n  })\n\n  describe('Specific columns', function () {\n    it('should find match in column', function () {\n      var result = list.search('jonny', ['name'])\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(jonny)\n    })\n    it('should not find match in column', function () {\n      var result = list.search('jonny', ['born'])\n      expect(result.length).toEqual(0)\n    })\n    it('should find match in column', function () {\n      var result = list.search('jonny', ['name'])\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(jonny)\n    })\n    it('should not find match in column', function () {\n      var result = list.search('jonny', ['born'])\n      expect(result.length).toEqual(0)\n    })\n    it('should work with columns that do not exist', function () {\n      var result = list.search('jonny', ['pet'])\n      expect(result.length).toEqual(0)\n    })\n    it('should remove column option', function () {\n      var result = list.search('jonny', ['born'])\n      expect(result.length).toEqual(0)\n      result = list.search('jonny')\n      expect(result.length).toEqual(1)\n    })\n  })\n\n  describe('Custom search function', function () {\n    var customSearchFunction = function (searchString, columns) {\n      for (var k = 0, kl = list.items.length; k < kl; k++) {\n        if (list.items[k].values().born > 1985) {\n          list.items[k].found = true\n        }\n      }\n    }\n    it('should use custom function in third argument', function () {\n      var result = list.search('jonny', ['name'], customSearchFunction)\n      expect(result.length).toEqual(4)\n    })\n    it('should use custom function in second argument', function () {\n      var result = list.search('jonny', customSearchFunction)\n      expect(result.length).toEqual(4)\n    })\n  })\n\n  describe('Multiple word search', function () {\n    it('should find jonny, hasse', function () {\n      var result = list.search('berg str')\n      expect(result.length).toEqual(2)\n      expect(jonny.matching()).toBe(true)\n      expect(martina.matching()).toBe(false)\n      expect(angelica.matching()).toBe(false)\n      expect(sebastian.matching()).toBe(false)\n      expect(imma.matching()).toBe(false)\n      expect(hasse.matching()).toBe(true)\n    })\n    it('should find martina, angelica, sebastian, hasse', function () {\n      var result = list.search('a e')\n      expect(result.length).toEqual(4)\n      expect(jonny.matching()).toBe(false)\n      expect(martina.matching()).toBe(true)\n      expect(angelica.matching()).toBe(true)\n      expect(sebastian.matching()).toBe(true)\n      expect(imma.matching()).toBe(false)\n      expect(hasse.matching()).toBe(true)\n    })\n    it('stripping whitespace should find martina', function () {\n      var result = list.search('martina  elm ')\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(martina)\n    })\n  })\n\n  describe('Quoted phrase searches', function () {\n    it('should find martina', function () {\n      var result = list.search('\"a e\"')\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(martina)\n    })\n    it('quoted phrase and multiple words should find jonny', function () {\n      var result = list.search('\" str\" 1986')\n      expect(result.length).toEqual(1)\n      expect(result[0]).toEqual(jonny)\n    })\n  })\n\n  //\n  // describe('Special characters', function() {\n  //   it('should escape and handle special characters', function() {\n  //     list.add([\n  //       { name: 'Jonny&Jabba' },\n  //       { name: '<Leia' },\n  //       { name: '>Luke' },\n  //       { name: '\"Chewie\"' },\n  //       { name: \"'Ewok'\" }\n  //     ]);\n  //     var result = list.search('Leia');\n  //     console.log(result);\n  //     expect(result.length).toEqual(1);\n  //     var result = list.search('<');\n  //     console.log(result);\n  //     expect(result.length).toEqual(1);\n  //   });\n  // });\n})\n"
  },
  {
    "path": "__test__/show.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Show', function () {\n  var list, a, b, c, d, e, f\n\n  beforeAll(function () {\n    list = fixture.list(\n      ['id', 'id2'],\n      [\n        { id: '1', id2: 'a' },\n        { id: '2', id2: 'a' },\n        { id: '3', id2: 'b' },\n        { id: '4', id2: 'b' },\n        { id: '5', id2: 'bc' },\n        { id: '6', id2: 'bc' },\n      ]\n    )\n    a = list.get('id', '1')[0]\n    b = list.get('id', '2')[0]\n    c = list.get('id', '3')[0]\n    d = list.get('id', '4')[0]\n    e = list.get('id', '5')[0]\n    f = list.get('id', '6')[0]\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  afterEach(function () {\n    list.filter()\n    list.show(1, 200)\n  })\n\n  describe('Basics', function () {\n    it('should be 1, 2', function () {\n      list.show(1, 2)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(a.visible()).toBe(true)\n      expect(b.visible()).toBe(true)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(false)\n      expect(f.visible()).toBe(false)\n    })\n    it('should show item 6', function () {\n      list.show(6, 2)\n      expect(list.visibleItems.length).toEqual(1)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(false)\n      expect(f.visible()).toBe(true)\n    })\n    it('should show item 1, 2, 3, 4, 5, 6', function () {\n      list.show(1, 200)\n      expect(list.visibleItems.length).toEqual(6)\n      expect(a.visible()).toBe(true)\n      expect(b.visible()).toBe(true)\n      expect(c.visible()).toBe(true)\n      expect(d.visible()).toBe(true)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(true)\n    })\n    it('should show item 3, 4, 5', function () {\n      list.show(3, 3)\n      expect(list.visibleItems.length).toEqual(3)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(true)\n      expect(d.visible()).toBe(true)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(false)\n    })\n    it('should show item 5, 6', function () {\n      list.show(5, 3)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(true)\n    })\n  })\n\n  describe('Search', function () {\n    afterEach(function () {\n      list.search()\n    })\n    it('should show 3, 4', function () {\n      list.search('b')\n      list.show(1, 2)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(true)\n      expect(d.visible()).toBe(true)\n      expect(e.visible()).toBe(false)\n      expect(f.visible()).toBe(false)\n    })\n    it('should show item 3,4,5,6', function () {\n      list.search('b')\n      list.show(1, 4)\n      expect(list.visibleItems.length).toEqual(4)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(true)\n      expect(d.visible()).toBe(true)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(true)\n    })\n    it('should not show any items but match two', function () {\n      list.search('a')\n      list.show(3, 2)\n      expect(list.visibleItems.length).toEqual(0)\n      expect(list.matchingItems.length).toEqual(2)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(false)\n      expect(f.visible()).toBe(false)\n    })\n  })\n\n  describe('Filter', function () {\n    afterEach(function () {\n      list.filter()\n    })\n    it('should show 3, 4', function () {\n      list.filter(function (item) {\n        return item.values().id2 == 'b'\n      })\n      list.show(1, 2)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(list.matchingItems.length).toEqual(2)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(true)\n      expect(d.visible()).toBe(true)\n      expect(e.visible()).toBe(false)\n      expect(f.visible()).toBe(false)\n    })\n    it('should show item 3,4,5,6', function () {\n      list.filter(function (item) {\n        return item.values().id2 == 'bc'\n      })\n      list.show(1, 4)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(list.matchingItems.length).toEqual(2)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(true)\n    })\n    it('should not show any items but match two', function () {\n      list.filter(function (item) {\n        return item.values().id2 == 'b'\n      })\n      list.show(3, 2)\n      expect(list.visibleItems.length).toEqual(0)\n      expect(list.matchingItems.length).toEqual(2)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(false)\n      expect(f.visible()).toBe(false)\n    })\n  })\n\n  describe('Filter and search', function () {\n    afterEach(function () {\n      list.filter()\n    })\n    it('should show 4, 5', function () {\n      list.show(1, 2)\n      list.filter(function (item) {\n        return item.values().id > '3'\n      })\n      list.search('b')\n      expect(list.visibleItems.length).toEqual(2)\n      expect(list.matchingItems.length).toEqual(3)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(true)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(false)\n    })\n    it('should show 5, 6', function () {\n      list.show(1, 2)\n      list.filter(function (item) {\n        return item.values().id > '3'\n      })\n      list.search('b')\n      list.show(2, 2)\n      expect(list.visibleItems.length).toEqual(2)\n      expect(list.matchingItems.length).toEqual(3)\n      expect(a.visible()).toBe(false)\n      expect(b.visible()).toBe(false)\n      expect(c.visible()).toBe(false)\n      expect(d.visible()).toBe(false)\n      expect(e.visible()).toBe(true)\n      expect(f.visible()).toBe(true)\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/sort.test.js",
    "content": "const $ = require('jquery'),\n  fixture = require('./fixtures')\n\ndescribe('Sort', function () {\n  var list, i1, i2, i3, i4, i5, i6\n\n  beforeEach(function () {\n    list = fixture.list(\n      ['id'],\n      [\n        { id: '1', val: '' },\n        { id: '2', val: '' },\n        { id: '3', val: '' },\n        { id: '4', val: '' },\n        { id: '5', val: '' },\n        { id: '6', val: '' },\n      ]\n    )\n    i1 = list.get('id', '1')[0]\n    i2 = list.get('id', '2')[0]\n    i3 = list.get('id', '3')[0]\n    i4 = list.get('id', '4')[0]\n    i5 = list.get('id', '5')[0]\n    i6 = list.get('id', '6')[0]\n  })\n\n  afterEach(function () {\n    fixture.removeList()\n  })\n\n  describe('Basics', function () {\n    it('should sort letters asc', function () {\n      i1.values({ val: 'b' })\n      i2.values({ val: 'a' })\n      i3.values({ val: 'c' })\n      i4.values({ val: 'z' })\n      i5.values({ val: 's' })\n      i6.values({ val: 'y' })\n      list.sort('val')\n      expect(list.items[0].values().val).toBe('a')\n      expect(list.items[1].values().val).toBe('b')\n      expect(list.items[2].values().val).toBe('c')\n      expect(list.items[3].values().val).toBe('s')\n      expect(list.items[4].values().val).toBe('y')\n      expect(list.items[5].values().val).toBe('z')\n    })\n    it('should sort letters desc', function () {\n      i1.values({ val: 'b' })\n      i2.values({ val: 'a' })\n      i3.values({ val: 'c' })\n      i4.values({ val: 'z' })\n      i5.values({ val: 's' })\n      i6.values({ val: 'y' })\n      list.sort('val', { order: 'desc' })\n      expect(list.items[0].values().val).toBe('z')\n      expect(list.items[1].values().val).toBe('y')\n      expect(list.items[2].values().val).toBe('s')\n      expect(list.items[3].values().val).toBe('c')\n      expect(list.items[4].values().val).toBe('b')\n      expect(list.items[5].values().val).toBe('a')\n    })\n    it('should sort åäö desc', function () {\n      list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö'\n      i1.values({ val: 'a' })\n      i2.values({ val: 'å' })\n      i3.values({ val: 'ä' })\n      i4.values({ val: 'ö' })\n      i5.values({ val: 'o' })\n      i6.values({ val: 's' })\n      list.sort('val', { order: 'desc' })\n      expect(list.items[0].values().val).toBe('ö')\n      expect(list.items[1].values().val).toBe('ä')\n      expect(list.items[2].values().val).toBe('å')\n      expect(list.items[3].values().val).toBe('s')\n      expect(list.items[4].values().val).toBe('o')\n      expect(list.items[5].values().val).toBe('a')\n    })\n    it('should sort åäö asc', function () {\n      list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö'\n      i1.values({ val: 'a' })\n      i2.values({ val: 'å' })\n      i3.values({ val: 'ä' })\n      i4.values({ val: 'ö' })\n      i5.values({ val: 'o' })\n      i6.values({ val: 's' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('a')\n      expect(list.items[1].values().val).toBe('o')\n      expect(list.items[2].values().val).toBe('s')\n      expect(list.items[3].values().val).toBe('å')\n      expect(list.items[4].values().val).toBe('ä')\n      expect(list.items[5].values().val).toBe('ö')\n    })\n    it('should sort åäö desc case insensitive', function () {\n      list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö'\n      i1.values({ val: 'a' })\n      i2.values({ val: 'Å' })\n      i3.values({ val: 'ä' })\n      i4.values({ val: 'Ö' })\n      i5.values({ val: 'o' })\n      i6.values({ val: 'S' })\n      list.sort('val', { order: 'desc' })\n      expect(list.items[0].values().val).toBe('Ö')\n      expect(list.items[1].values().val).toBe('ä')\n      expect(list.items[2].values().val).toBe('Å')\n      expect(list.items[3].values().val).toBe('S')\n      expect(list.items[4].values().val).toBe('o')\n      expect(list.items[5].values().val).toBe('a')\n    })\n    it('should sort åäö asc case insensitive', function () {\n      list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö'\n      i1.values({ val: 'A' })\n      i2.values({ val: 'å' })\n      i3.values({ val: 'Ä' })\n      i4.values({ val: 'ö' })\n      i5.values({ val: 'O' })\n      i6.values({ val: 's' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('A')\n      expect(list.items[1].values().val).toBe('O')\n      expect(list.items[2].values().val).toBe('s')\n      expect(list.items[3].values().val).toBe('å')\n      expect(list.items[4].values().val).toBe('Ä')\n      expect(list.items[5].values().val).toBe('ö')\n    })\n    it('should handle case-insensitive by default', function () {\n      i1.values({ val: 'e' })\n      i2.values({ val: 'b' })\n      i4.values({ val: 'F' })\n      i3.values({ val: 'D' })\n      i5.values({ val: 'A' })\n      i6.values({ val: 'C' })\n      list.sort('val')\n      expect(list.items[0].values().val).toBe('A')\n      expect(list.items[1].values().val).toBe('b')\n      expect(list.items[2].values().val).toBe('C')\n      expect(list.items[3].values().val).toBe('D')\n      expect(list.items[4].values().val).toBe('e')\n      expect(list.items[5].values().val).toBe('F')\n    })\n    it('should disable insensitive', function () {\n      i1.values({ val: 'e' })\n      i2.values({ val: 'b' })\n      i4.values({ val: 'F' })\n      i3.values({ val: 'D' })\n      i5.values({ val: 'A' })\n      i6.values({ val: 'C' })\n      list.sort('val', { insensitive: false })\n      expect(list.items[0].values().val).toBe('A')\n      expect(list.items[1].values().val).toBe('C')\n      expect(list.items[2].values().val).toBe('D')\n      expect(list.items[3].values().val).toBe('F')\n      expect(list.items[4].values().val).toBe('b')\n      expect(list.items[5].values().val).toBe('e')\n    })\n    it('should sort dates', function () {\n      i1.values({ val: '2008-12-10' })\n      i2.values({ val: '2008-11-10' })\n      i3.values({ val: '2007-11-10' })\n      i4.values({ val: '2009-12-10' })\n      i5.values({ val: '2007-01-4' })\n      i6.values({ val: '2006-12-10' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('2006-12-10')\n      expect(list.items[1].values().val).toBe('2007-01-4')\n      expect(list.items[2].values().val).toBe('2007-11-10')\n      expect(list.items[3].values().val).toBe('2008-11-10')\n      expect(list.items[4].values().val).toBe('2008-12-10')\n      expect(list.items[5].values().val).toBe('2009-12-10')\n    })\n    it('should sort file names (a bit wrong)', function () {\n      i1.values({ val: 'car.mov' })\n      i2.values({ val: '01alpha.sgi' })\n      i3.values({ val: '001alpha.sgi' })\n      i4.values({ val: 'my.string_41299.tif' })\n      i5.values({ val: '0003.zip' })\n      i6.values({ val: '0002.asp' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('01alpha.sgi')\n      expect(list.items[1].values().val).toBe('001alpha.sgi')\n      expect(list.items[2].values().val).toBe('0002.asp')\n      expect(list.items[3].values().val).toBe('0003.zip')\n      expect(list.items[4].values().val).toBe('car.mov')\n      expect(list.items[5].values().val).toBe('my.string_41299.tif')\n    })\n    it('should show order of sorted floates (a bit wrong)', function () {\n      i1.values({ val: '10.0401' })\n      i2.values({ val: '10.022' })\n      i3.values({ val: '10.021999' })\n      i4.values({ val: '11.231' })\n      i5.values({ val: '0003.123' })\n      i6.values({ val: '09.2123' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('0003.123')\n      expect(list.items[1].values().val).toBe('09.2123')\n      expect(list.items[2].values().val).toBe('10.022')\n      expect(list.items[3].values().val).toBe('10.0401')\n      expect(list.items[4].values().val).toBe('10.021999')\n      expect(list.items[5].values().val).toBe('11.231')\n    })\n    it('should sort IP addresses', function () {\n      i1.values({ val: '192.168.1.1' })\n      i2.values({ val: '192.168.0.100' })\n      i3.values({ val: '192.168.0.1' })\n      i4.values({ val: '192.168.1.3' })\n      i5.values({ val: '127.0.0.1' })\n      i6.values({ val: '192.168.1.2' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('127.0.0.1')\n      expect(list.items[1].values().val).toBe('192.168.0.1')\n      expect(list.items[2].values().val).toBe('192.168.0.100')\n      expect(list.items[3].values().val).toBe('192.168.1.1')\n      expect(list.items[4].values().val).toBe('192.168.1.2')\n      expect(list.items[5].values().val).toBe('192.168.1.3')\n    })\n    it('should not break with weird values', function () {\n      i1.values({ val: undefined })\n      i2.values({ val: null })\n      i3.values({ val: 0 })\n      i4.values({ val: function () {} })\n      i5.values({ val: { foo: 'bar' } })\n\n      expect(function () {\n        list.sort('val')\n      }).not.toThrow()\n    })\n    it('should handle values from issue 387', function () {\n      i1.values({ val: 'Test' })\n      i2.values({ val: 'Test1Test2' })\n      i3.values({ val: 'Bill-To Phone1 Extension' })\n      i4.values({ val: 'z' })\n      i5.values({ val: 's' })\n      i6.values({ val: 'y' })\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('Bill-To Phone1 Extension')\n      expect(list.items[1].values().val).toBe('s')\n      expect(list.items[2].values().val).toBe('Test')\n      expect(list.items[3].values().val).toBe('Test1Test2')\n      expect(list.items[4].values().val).toBe('y')\n      expect(list.items[5].values().val).toBe('z')\n    })\n\n    xit('should show how random values are sorted', function () {\n      list.add({ id: '7', val: '' })\n      list.add({ id: '8', val: '' })\n      list.add({ id: '9', val: '' })\n      list.add({ id: '10', val: '' })\n      list.add({ id: '11', val: '' })\n      list.add({ id: '12', val: '' })\n\n      var i7 = list.get('id', '7')[0],\n        i8 = list.get('id', '8')[0],\n        i9 = list.get('id', '9')[0],\n        i10 = list.get('id', '10')[0],\n        i11 = list.get('id', '11')[0],\n        i12 = list.get('id', '12')[0]\n\n      i1.values({ val: undefined })\n      i2.values({ val: '' })\n      i3.values({ val: null })\n      i4.values({ val: 'a' })\n      i5.values({ val: '0' })\n      i6.values({ val: true })\n      i7.values({ val: 0 })\n      i8.values({ val: 'z' })\n      i9.values({ val: '!' })\n      i10.values({ val: '?' })\n      i11.values({ val: 100 })\n      i12.values({ val: false })\n\n      list.sort('val', { order: 'asc' })\n      list.sort('val', { order: 'desc' })\n      list.sort('val', { order: 'asc' })\n\n      expect(list.items[0].values().val).toBe('')\n      expect(list.items[1].values().val).toBe('!')\n      expect(list.items[2].values().val).toBe(0)\n      expect(list.items[3].values().val).toBe('0')\n      expect(list.items[4].values().val).toBe(100)\n      expect(list.items[5].values().val).toBe('?')\n      expect(list.items[6].values().val).toBe('a')\n      expect(list.items[7].values().val).toBe(false)\n      expect(list.items[8].values().val).toBe(null)\n      expect(list.items[9].values().val).toBe(true)\n      expect(list.items[10].values().val).toBe(undefined)\n      expect(list.items[11].values().val).toBe('z')\n    })\n\n    it('should handle not longer (since 1.4.0) space and zero the same for desc and asc', function () {\n      list.clear()\n      list.add({ val: '' })\n      list.add({ val: '0' })\n      list.add({ val: 0 })\n\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('')\n      expect(list.items[1].values().val).toBe('0')\n      expect(list.items[2].values().val).toBe(0)\n      list.sort('val', { order: 'desc' })\n      expect(list.items[0].values().val).toBe('0')\n      expect(list.items[1].values().val).toBe(0)\n      expect(list.items[2].values().val).toBe('')\n      list.sort('val', { order: 'asc' })\n      expect(list.items[0].values().val).toBe('')\n      expect(list.items[1].values().val).toBe('0')\n      expect(list.items[2].values().val).toBe(0)\n    })\n  })\n\n  describe('Custom sort function', function () {\n    it('should use custom sort option', function () {\n      i1.values({ val: \"<input value='b' />\" })\n      i2.values({ val: \"<input value='a' />\" })\n      i3.values({ val: \"<input value='c' />\" })\n      i4.values({ val: \"<input value='z' />\" })\n      i5.values({ val: \"<input value='s' />\" })\n      i6.values({ val: \"<input value='y' />\" })\n      list.sort('val', {\n        sortFunction: function (itemA, itemB, options) {\n          return list.utils.naturalSort(\n            $(itemA.values()[options.valueName]).val(),\n            $(itemB.values()[options.valueName]).val()\n          )\n        },\n      })\n      expect(list.items[0].values().val).toBe(\"<input value='a' />\")\n      expect(list.items[1].values().val).toBe(\"<input value='b' />\")\n      expect(list.items[2].values().val).toBe(\"<input value='c' />\")\n      expect(list.items[3].values().val).toBe(\"<input value='s' />\")\n      expect(list.items[4].values().val).toBe(\"<input value='y' />\")\n      expect(list.items[5].values().val).toBe(\"<input value='z' />\")\n    })\n    it('should use default custom sort function', function () {\n      list.sortFunction = function (itemA, itemB, options) {\n        return list.utils.naturalSort(\n          $(itemA.values()[options.valueName]).val(),\n          $(itemB.values()[options.valueName]).val()\n        )\n      }\n      i1.values({ val: \"<input value='b' />\" })\n      i2.values({ val: \"<input value='a' />\" })\n      i3.values({ val: \"<input value='c' />\" })\n      i4.values({ val: \"<input value='z' />\" })\n      i5.values({ val: \"<input value='s' />\" })\n      i6.values({ val: \"<input value='y' />\" })\n      list.sort('val')\n      expect(list.items[0].values().val).toBe(\"<input value='a' />\")\n      expect(list.items[1].values().val).toBe(\"<input value='b' />\")\n      expect(list.items[2].values().val).toBe(\"<input value='c' />\")\n      expect(list.items[3].values().val).toBe(\"<input value='s' />\")\n      expect(list.items[4].values().val).toBe(\"<input value='y' />\")\n      expect(list.items[5].values().val).toBe(\"<input value='z' />\")\n    })\n    it('should use default custom sort function with order desc', function () {\n      list.sortFunction = function (itemA, itemB, options) {\n        return list.utils.naturalSort(\n          $(itemA.values()[options.valueName]).val(),\n          $(itemB.values()[options.valueName]).val()\n        )\n      }\n      i1.values({ val: \"<input value='b' />\" })\n      i2.values({ val: \"<input value='a' />\" })\n      i3.values({ val: \"<input value='c' />\" })\n      i4.values({ val: \"<input value='z' />\" })\n      i5.values({ val: \"<input value='s' />\" })\n      i6.values({ val: \"<input value='y' />\" })\n      list.sort('val', { order: 'desc' })\n      expect(list.items[0].values().val).toBe(\"<input value='z' />\")\n      expect(list.items[1].values().val).toBe(\"<input value='y' />\")\n      expect(list.items[2].values().val).toBe(\"<input value='s' />\")\n      expect(list.items[3].values().val).toBe(\"<input value='c' />\")\n      expect(list.items[4].values().val).toBe(\"<input value='b' />\")\n      expect(list.items[5].values().val).toBe(\"<input value='a' />\")\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/trigger.test.js",
    "content": "const fixture = require('./fixtures')\n\ndescribe('Trigger', function () {\n  var list\n\n  beforeAll(function () {\n    list = fixture.list(['name', 'born'], fixture.all)\n  })\n\n  afterAll(function () {\n    fixture.removeList()\n  })\n\n  describe('General', function () {\n    it('should be triggered by searchComplete', function (done) {\n      list.on('searchComplete', function () {\n        done()\n      })\n      list.trigger('searchComplete')\n    })\n  })\n})\n"
  },
  {
    "path": "__test__/usage/amd.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <script data-main=\"main\" src=\"require.js\"></script>\n  <link rel=\"stylesheet\" href=\"style.css\" />\n</head>\n<body>\n\n  <div id=\"users\">\n    <input class=\"search\" placeholder=\"Search\" />\n    <button class=\"sort\" data-sort=\"name\">\n      Sort by name\n    </button>\n    <ul class=\"list\">\n      <li>\n        <h3 class=\"name\">Jonny Stromberg</h3>\n        <p class=\"born\">1986</p>\n      </li>\n      <li>\n        <h3 class=\"name\">Jonas Arnklint</h3>\n        <p class=\"born\">1985</p>\n      </li>\n      <li>\n        <h3 class=\"name\">Martina Elm</h3>\n        <p class=\"born\">1986</p>\n      </li>\n      <li>\n        <h3 class=\"name\">Gustaf Lindqvist</h3>\n        <p class=\"born\">1983</p>\n      </li>\n    </ul>\n  </div>\n</body>\n</html>\n"
  },
  {
    "path": "__test__/usage/classic.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <script src=\"../../dist/list.min.js\"></script>\n  <link rel=\"stylesheet\" href=\"style.css\" />\n</head>\n<body>\n\n  <div id=\"users\">\n    <input class=\"search\" placeholder=\"Search\" />\n    <button class=\"sort\" data-sort=\"name\">\n      Sort by name\n    </button>\n    <ul class=\"list\">\n      <li data-id=\"1\">\n        <a href=\"https://twitter.com/javve\" class=\"link name\">Jonny Stromberg</a>\n        <p class=\"born timestamp\" data-timestamp=\"12345\">1986</p>\n        <img class=\"image\" src=\"luke.jpeg\">\n      </li>\n      <li data-id=\"2\">\n        <a href=\"https://twitter.com/arnklint\" class=\"link name\">Jonas Arnklint</a>\n        <p class=\"born timestamp\" data-timestamp=\"23456\">1985</p>\n        <img class=\"image\" src=\"darth.jpeg\">\n      </li>\n      <li data-id=\"3\">\n        <a href=\"https://twitter.com/martinaelm\" class=\"link name\">Martina Elm</a>\n        <p class=\"born timestamp\" data-timestamp=\"34567\">1986</p>\n        <img class=\"image\" src=\"rey.jpeg\">\n      </li>\n      <li data-id=\"4\">\n        <a href=\"https://twitter.com/GLindqvist\" class=\"link name\">Gustaf Lindqvist</a>\n        <p class=\"born timestamp\" data-timestamp=\"45678\">1983</p>\n        <img class=\"image\" src=\"boba.jpeg\">\n      </li>\n    </ul>\n  </div>\n\n  <script>\n    var options = {\n      valueNames: [\n        'name',\n        'born',\n        { data: ['id'] },\n        { attr: 'src', name: 'image' },\n        { attr: 'href', name: 'link' },\n        { attr: 'data-timestamp', name: 'timestamp' }\n      ]\n    };\n    var userList = new List('users', options);\n    userList.add({ name: 'Leia', born: '1954', image: 'leia.jpeg', id: 5, timestamp: '67893' });\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "__test__/usage/fuzzy-search-pagination.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=utf-8 />\n  <title>Basic example</title>\n</head>\n<body>\n\n  <div id=\"test-list\">\n    <input type=\"text\" class=\"fuzzy-search\" />\n    <ul class=\"pagination1\"></ul>\n    <ul class=\"list\">\n      <li><p class=\"name\">Guybrush Threepwood</p></li>\n      <li><p class=\"name\">Manny Calavera</p></li>\n      <li><p class=\"name\">Bernard Bernoulli</p></li>\n      <li><p class=\"name\">LeChuck</p></li>\n      <li><p class=\"name\">Elaine Marley-Threepwood</p></li>\n      <li><p class=\"name\">Purple Tentacle</p></li>\n      <li><p class=\"name\">Adrian Ripburger</p></li>\n      <li><p class=\"name\">Bobbin Threadbare</p></li>\n      <li><p class=\"name\">Murray the Demonic Skull</p></li>\n      <li><p class=\"name\">Zak McKracken</p></li>\n    </ul>\n    <ul class=\"pagination2\"></ul>\n  </div>\n\n  <script src=\"../../dist/list.js\"></script>\n  <script>\n    var options = {\n      valueNames: ['name'],\n      pagination: [{\n        paginationClass: 'pagination1',\n        innerWindow:1\n      },{\n        paginationClass: 'pagination2'\n      }],\n      page:3\n    };\n\n    var monkeyList = new List('test-list', options);\n    console.log(monkeyList);\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "__test__/usage/main.js",
    "content": "require(['../../dist/list', '../../dist/list.min'], function (List, ListMin) {\n  var options = {\n    valueNames: ['name', 'born'],\n  }\n  var userList = new List('users', options)\n})\n"
  },
  {
    "path": "__test__/usage/require.js",
    "content": "/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.1.17 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/requirejs for details\n */\n//Not using strict: uneven strict support in browsers, #392, and causes\n//problems with requirejs.exec()/transpiler plugins that may not be strict.\n/*jslint regexp: true, nomen: true, sloppy: true */\n/*global window, navigator, document, importScripts, setTimeout, opera */\n\nvar requirejs, require, define\n;(function (global) {\n  var req,\n    s,\n    head,\n    baseElement,\n    dataMain,\n    src,\n    interactiveScript,\n    currentlyAddingScript,\n    mainScript,\n    subPath,\n    version = '2.1.17',\n    commentRegExp = /(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/gm,\n    cjsRequireRegExp = /[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,\n    jsSuffixRegExp = /\\.js$/,\n    currDirRegExp = /^\\.\\//,\n    op = Object.prototype,\n    ostring = op.toString,\n    hasOwn = op.hasOwnProperty,\n    ap = Array.prototype,\n    apsp = ap.splice,\n    isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),\n    isWebWorker = !isBrowser && typeof importScripts !== 'undefined',\n    //PS3 indicates loaded and complete, but need to wait for complete\n    //specifically. Sequence is 'loading', 'loaded', execution,\n    // then 'complete'. The UA check is unfortunate, but not sure how\n    //to feature test w/o causing perf issues.\n    readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? /^complete$/ : /^(complete|loaded)$/,\n    defContextName = '_',\n    //Oh the tragedy, detecting opera. See the usage of isOpera for reason.\n    isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',\n    contexts = {},\n    cfg = {},\n    globalDefQueue = [],\n    useInteractive = false\n\n  function isFunction(it) {\n    return ostring.call(it) === '[object Function]'\n  }\n\n  function isArray(it) {\n    return ostring.call(it) === '[object Array]'\n  }\n\n  /**\n   * Helper function for iterating over an array. If the func returns\n   * a true value, it will break out of the loop.\n   */\n  function each(ary, func) {\n    if (ary) {\n      var i\n      for (i = 0; i < ary.length; i += 1) {\n        if (ary[i] && func(ary[i], i, ary)) {\n          break\n        }\n      }\n    }\n  }\n\n  /**\n   * Helper function for iterating over an array backwards. If the func\n   * returns a true value, it will break out of the loop.\n   */\n  function eachReverse(ary, func) {\n    if (ary) {\n      var i\n      for (i = ary.length - 1; i > -1; i -= 1) {\n        if (ary[i] && func(ary[i], i, ary)) {\n          break\n        }\n      }\n    }\n  }\n\n  function hasProp(obj, prop) {\n    return hasOwn.call(obj, prop)\n  }\n\n  function getOwn(obj, prop) {\n    return hasProp(obj, prop) && obj[prop]\n  }\n\n  /**\n   * Cycles over properties in an object and calls a function for each\n   * property value. If the function returns a truthy value, then the\n   * iteration is stopped.\n   */\n  function eachProp(obj, func) {\n    var prop\n    for (prop in obj) {\n      if (hasProp(obj, prop)) {\n        if (func(obj[prop], prop)) {\n          break\n        }\n      }\n    }\n  }\n\n  /**\n   * Simple function to mix in properties from source into target,\n   * but only if target does not already have a property of the same name.\n   */\n  function mixin(target, source, force, deepStringMixin) {\n    if (source) {\n      eachProp(source, function (value, prop) {\n        if (force || !hasProp(target, prop)) {\n          if (\n            deepStringMixin &&\n            typeof value === 'object' &&\n            value &&\n            !isArray(value) &&\n            !isFunction(value) &&\n            !(value instanceof RegExp)\n          ) {\n            if (!target[prop]) {\n              target[prop] = {}\n            }\n            mixin(target[prop], value, force, deepStringMixin)\n          } else {\n            target[prop] = value\n          }\n        }\n      })\n    }\n    return target\n  }\n\n  //Similar to Function.prototype.bind, but the 'this' object is specified\n  //first, since it is easier to read/figure out what 'this' will be.\n  function bind(obj, fn) {\n    return function () {\n      return fn.apply(obj, arguments)\n    }\n  }\n\n  function scripts() {\n    return document.getElementsByTagName('script')\n  }\n\n  function defaultOnError(err) {\n    throw err\n  }\n\n  //Allow getting a global that is expressed in\n  //dot notation, like 'a.b.c'.\n  function getGlobal(value) {\n    if (!value) {\n      return value\n    }\n    var g = global\n    each(value.split('.'), function (part) {\n      g = g[part]\n    })\n    return g\n  }\n\n  /**\n   * Constructs an error with a pointer to an URL with more information.\n   * @param {String} id the error ID that maps to an ID on a web page.\n   * @param {String} message human readable error.\n   * @param {Error} [err] the original error, if there is one.\n   *\n   * @returns {Error}\n   */\n  function makeError(id, msg, err, requireModules) {\n    var e = new Error(msg + '\\nhttp://requirejs.org/docs/errors.html#' + id)\n    e.requireType = id\n    e.requireModules = requireModules\n    if (err) {\n      e.originalError = err\n    }\n    return e\n  }\n\n  if (typeof define !== 'undefined') {\n    //If a define is already in play via another AMD loader,\n    //do not overwrite.\n    return\n  }\n\n  if (typeof requirejs !== 'undefined') {\n    if (isFunction(requirejs)) {\n      //Do not overwrite an existing requirejs instance.\n      return\n    }\n    cfg = requirejs\n    requirejs = undefined\n  }\n\n  //Allow for a require config object\n  if (typeof require !== 'undefined' && !isFunction(require)) {\n    //assume it is a config object.\n    cfg = require\n    require = undefined\n  }\n\n  function newContext(contextName) {\n    var inCheckLoaded,\n      Module,\n      context,\n      handlers,\n      checkLoadedTimeoutId,\n      config = {\n        //Defaults. Do not set a default for map\n        //config to speed up normalize(), which\n        //will run faster if there is no default.\n        waitSeconds: 7,\n        baseUrl: './',\n        paths: {},\n        bundles: {},\n        pkgs: {},\n        shim: {},\n        config: {},\n      },\n      registry = {},\n      //registry of just enabled modules, to speed\n      //cycle breaking code when lots of modules\n      //are registered, but not activated.\n      enabledRegistry = {},\n      undefEvents = {},\n      defQueue = [],\n      defined = {},\n      urlFetched = {},\n      bundlesMap = {},\n      requireCounter = 1,\n      unnormalizedCounter = 1\n\n    /**\n     * Trims the . and .. from an array of path segments.\n     * It will keep a leading path segment if a .. will become\n     * the first path segment, to help with module name lookups,\n     * which act like paths, but can be remapped. But the end result,\n     * all paths that use this function should look normalized.\n     * NOTE: this method MODIFIES the input array.\n     * @param {Array} ary the array of path segments.\n     */\n    function trimDots(ary) {\n      var i, part\n      for (i = 0; i < ary.length; i++) {\n        part = ary[i]\n        if (part === '.') {\n          ary.splice(i, 1)\n          i -= 1\n        } else if (part === '..') {\n          // If at the start, or previous value is still ..,\n          // keep them so that when converted to a path it may\n          // still work when converted to a path, even though\n          // as an ID it is less than ideal. In larger point\n          // releases, may be better to just kick out an error.\n          if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {\n            continue\n          } else if (i > 0) {\n            ary.splice(i - 1, 2)\n            i -= 2\n          }\n        }\n      }\n    }\n\n    /**\n     * Given a relative module name, like ./something, normalize it to\n     * a real name that can be mapped to a path.\n     * @param {String} name the relative name\n     * @param {String} baseName a real name that the name arg is relative\n     * to.\n     * @param {Boolean} applyMap apply the map config to the value. Should\n     * only be done if this normalization is for a dependency ID.\n     * @returns {String} normalized name\n     */\n    function normalize(name, baseName, applyMap) {\n      var pkgMain,\n        mapValue,\n        nameParts,\n        i,\n        j,\n        nameSegment,\n        lastIndex,\n        foundMap,\n        foundI,\n        foundStarMap,\n        starI,\n        normalizedBaseParts,\n        baseParts = baseName && baseName.split('/'),\n        map = config.map,\n        starMap = map && map['*']\n\n      //Adjust any relative paths.\n      if (name) {\n        name = name.split('/')\n        lastIndex = name.length - 1\n\n        // If wanting node ID compatibility, strip .js from end\n        // of IDs. Have to do this here, and not in nameToUrl\n        // because node allows either .js or non .js to map\n        // to same file.\n        if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n          name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '')\n        }\n\n        // Starts with a '.' so need the baseName\n        if (name[0].charAt(0) === '.' && baseParts) {\n          //Convert baseName to array, and lop off the last part,\n          //so that . matches that 'directory' and not name of the baseName's\n          //module. For instance, baseName of 'one/two/three', maps to\n          //'one/two/three.js', but we want the directory, 'one/two' for\n          //this normalization.\n          normalizedBaseParts = baseParts.slice(0, baseParts.length - 1)\n          name = normalizedBaseParts.concat(name)\n        }\n\n        trimDots(name)\n        name = name.join('/')\n      }\n\n      //Apply map config if available.\n      if (applyMap && map && (baseParts || starMap)) {\n        nameParts = name.split('/')\n\n        outerLoop: for (i = nameParts.length; i > 0; i -= 1) {\n          nameSegment = nameParts.slice(0, i).join('/')\n\n          if (baseParts) {\n            //Find the longest baseName segment match in the config.\n            //So, do joins on the biggest to smallest lengths of baseParts.\n            for (j = baseParts.length; j > 0; j -= 1) {\n              mapValue = getOwn(map, baseParts.slice(0, j).join('/'))\n\n              //baseName segment has config, find if it has one for\n              //this name.\n              if (mapValue) {\n                mapValue = getOwn(mapValue, nameSegment)\n                if (mapValue) {\n                  //Match, update name to the new value.\n                  foundMap = mapValue\n                  foundI = i\n                  break outerLoop\n                }\n              }\n            }\n          }\n\n          //Check for a star map match, but just hold on to it,\n          //if there is a shorter segment match later in a matching\n          //config, then favor over this star map.\n          if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {\n            foundStarMap = getOwn(starMap, nameSegment)\n            starI = i\n          }\n        }\n\n        if (!foundMap && foundStarMap) {\n          foundMap = foundStarMap\n          foundI = starI\n        }\n\n        if (foundMap) {\n          nameParts.splice(0, foundI, foundMap)\n          name = nameParts.join('/')\n        }\n      }\n\n      // If the name points to a package's name, use\n      // the package main instead.\n      pkgMain = getOwn(config.pkgs, name)\n\n      return pkgMain ? pkgMain : name\n    }\n\n    function removeScript(name) {\n      if (isBrowser) {\n        each(scripts(), function (scriptNode) {\n          if (\n            scriptNode.getAttribute('data-requiremodule') === name &&\n            scriptNode.getAttribute('data-requirecontext') === context.contextName\n          ) {\n            scriptNode.parentNode.removeChild(scriptNode)\n            return true\n          }\n        })\n      }\n    }\n\n    function hasPathFallback(id) {\n      var pathConfig = getOwn(config.paths, id)\n      if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {\n        //Pop off the first array value, since it failed, and\n        //retry\n        pathConfig.shift()\n        context.require.undef(id)\n\n        //Custom require that does not do map translation, since\n        //ID is \"absolute\", already mapped/resolved.\n        context.makeRequire(null, {\n          skipMap: true,\n        })([id])\n\n        return true\n      }\n    }\n\n    //Turns a plugin!resource to [plugin, resource]\n    //with the plugin being undefined if the name\n    //did not have a plugin prefix.\n    function splitPrefix(name) {\n      var prefix,\n        index = name ? name.indexOf('!') : -1\n      if (index > -1) {\n        prefix = name.substring(0, index)\n        name = name.substring(index + 1, name.length)\n      }\n      return [prefix, name]\n    }\n\n    /**\n     * Creates a module mapping that includes plugin prefix, module\n     * name, and path. If parentModuleMap is provided it will\n     * also normalize the name via require.normalize()\n     *\n     * @param {String} name the module name\n     * @param {String} [parentModuleMap] parent module map\n     * for the module name, used to resolve relative names.\n     * @param {Boolean} isNormalized: is the ID already normalized.\n     * This is true if this call is done for a define() module ID.\n     * @param {Boolean} applyMap: apply the map config to the ID.\n     * Should only be true if this map is for a dependency.\n     *\n     * @returns {Object}\n     */\n    function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {\n      var url,\n        pluginModule,\n        suffix,\n        nameParts,\n        prefix = null,\n        parentName = parentModuleMap ? parentModuleMap.name : null,\n        originalName = name,\n        isDefine = true,\n        normalizedName = ''\n\n      //If no name, then it means it is a require call, generate an\n      //internal name.\n      if (!name) {\n        isDefine = false\n        name = '_@r' + (requireCounter += 1)\n      }\n\n      nameParts = splitPrefix(name)\n      prefix = nameParts[0]\n      name = nameParts[1]\n\n      if (prefix) {\n        prefix = normalize(prefix, parentName, applyMap)\n        pluginModule = getOwn(defined, prefix)\n      }\n\n      //Account for relative paths if there is a base name.\n      if (name) {\n        if (prefix) {\n          if (pluginModule && pluginModule.normalize) {\n            //Plugin is loaded, use its normalize method.\n            normalizedName = pluginModule.normalize(name, function (name) {\n              return normalize(name, parentName, applyMap)\n            })\n          } else {\n            // If nested plugin references, then do not try to\n            // normalize, as it will not normalize correctly. This\n            // places a restriction on resourceIds, and the longer\n            // term solution is not to normalize until plugins are\n            // loaded and all normalizations to allow for async\n            // loading of a loader plugin. But for now, fixes the\n            // common uses. Details in #1131\n            normalizedName = name.indexOf('!') === -1 ? normalize(name, parentName, applyMap) : name\n          }\n        } else {\n          //A regular module.\n          normalizedName = normalize(name, parentName, applyMap)\n\n          //Normalized name may be a plugin ID due to map config\n          //application in normalize. The map config values must\n          //already be normalized, so do not need to redo that part.\n          nameParts = splitPrefix(normalizedName)\n          prefix = nameParts[0]\n          normalizedName = nameParts[1]\n          isNormalized = true\n\n          url = context.nameToUrl(normalizedName)\n        }\n      }\n\n      //If the id is a plugin id that cannot be determined if it needs\n      //normalization, stamp it with a unique ID so two matching relative\n      //ids that may conflict can be separate.\n      suffix = prefix && !pluginModule && !isNormalized ? '_unnormalized' + (unnormalizedCounter += 1) : ''\n\n      return {\n        prefix: prefix,\n        name: normalizedName,\n        parentMap: parentModuleMap,\n        unnormalized: !!suffix,\n        url: url,\n        originalName: originalName,\n        isDefine: isDefine,\n        id: (prefix ? prefix + '!' + normalizedName : normalizedName) + suffix,\n      }\n    }\n\n    function getModule(depMap) {\n      var id = depMap.id,\n        mod = getOwn(registry, id)\n\n      if (!mod) {\n        mod = registry[id] = new context.Module(depMap)\n      }\n\n      return mod\n    }\n\n    function on(depMap, name, fn) {\n      var id = depMap.id,\n        mod = getOwn(registry, id)\n\n      if (hasProp(defined, id) && (!mod || mod.defineEmitComplete)) {\n        if (name === 'defined') {\n          fn(defined[id])\n        }\n      } else {\n        mod = getModule(depMap)\n        if (mod.error && name === 'error') {\n          fn(mod.error)\n        } else {\n          mod.on(name, fn)\n        }\n      }\n    }\n\n    function onError(err, errback) {\n      var ids = err.requireModules,\n        notified = false\n\n      if (errback) {\n        errback(err)\n      } else {\n        each(ids, function (id) {\n          var mod = getOwn(registry, id)\n          if (mod) {\n            //Set error on module, so it skips timeout checks.\n            mod.error = err\n            if (mod.events.error) {\n              notified = true\n              mod.emit('error', err)\n            }\n          }\n        })\n\n        if (!notified) {\n          req.onError(err)\n        }\n      }\n    }\n\n    /**\n     * Internal method to transfer globalQueue items to this context's\n     * defQueue.\n     */\n    function takeGlobalQueue() {\n      //Push all the globalDefQueue items into the context's defQueue\n      if (globalDefQueue.length) {\n        //Array splice in the values since the context code has a\n        //local var ref to defQueue, so cannot just reassign the one\n        //on context.\n        apsp.apply(defQueue, [defQueue.length, 0].concat(globalDefQueue))\n        globalDefQueue = []\n      }\n    }\n\n    handlers = {\n      require: function (mod) {\n        if (mod.require) {\n          return mod.require\n        } else {\n          return (mod.require = context.makeRequire(mod.map))\n        }\n      },\n      exports: function (mod) {\n        mod.usingExports = true\n        if (mod.map.isDefine) {\n          if (mod.exports) {\n            return (defined[mod.map.id] = mod.exports)\n          } else {\n            return (mod.exports = defined[mod.map.id] = {})\n          }\n        }\n      },\n      module: function (mod) {\n        if (mod.module) {\n          return mod.module\n        } else {\n          return (mod.module = {\n            id: mod.map.id,\n            uri: mod.map.url,\n            config: function () {\n              return getOwn(config.config, mod.map.id) || {}\n            },\n            exports: mod.exports || (mod.exports = {}),\n          })\n        }\n      },\n    }\n\n    function cleanRegistry(id) {\n      //Clean up machinery used for waiting modules.\n      delete registry[id]\n      delete enabledRegistry[id]\n    }\n\n    function breakCycle(mod, traced, processed) {\n      var id = mod.map.id\n\n      if (mod.error) {\n        mod.emit('error', mod.error)\n      } else {\n        traced[id] = true\n        each(mod.depMaps, function (depMap, i) {\n          var depId = depMap.id,\n            dep = getOwn(registry, depId)\n\n          //Only force things that have not completed\n          //being defined, so still in the registry,\n          //and only if it has not been matched up\n          //in the module already.\n          if (dep && !mod.depMatched[i] && !processed[depId]) {\n            if (getOwn(traced, depId)) {\n              mod.defineDep(i, defined[depId])\n              mod.check() //pass false?\n            } else {\n              breakCycle(dep, traced, processed)\n            }\n          }\n        })\n        processed[id] = true\n      }\n    }\n\n    function checkLoaded() {\n      var err,\n        usingPathFallback,\n        waitInterval = config.waitSeconds * 1000,\n        //It is possible to disable the wait interval by using waitSeconds of 0.\n        expired = waitInterval && context.startTime + waitInterval < new Date().getTime(),\n        noLoads = [],\n        reqCalls = [],\n        stillLoading = false,\n        needCycleCheck = true\n\n      //Do not bother if this call was a result of a cycle break.\n      if (inCheckLoaded) {\n        return\n      }\n\n      inCheckLoaded = true\n\n      //Figure out the state of all the modules.\n      eachProp(enabledRegistry, function (mod) {\n        var map = mod.map,\n          modId = map.id\n\n        //Skip things that are not enabled or in error state.\n        if (!mod.enabled) {\n          return\n        }\n\n        if (!map.isDefine) {\n          reqCalls.push(mod)\n        }\n\n        if (!mod.error) {\n          //If the module should be executed, and it has not\n          //been inited and time is up, remember it.\n          if (!mod.inited && expired) {\n            if (hasPathFallback(modId)) {\n              usingPathFallback = true\n              stillLoading = true\n            } else {\n              noLoads.push(modId)\n              removeScript(modId)\n            }\n          } else if (!mod.inited && mod.fetched && map.isDefine) {\n            stillLoading = true\n            if (!map.prefix) {\n              //No reason to keep looking for unfinished\n              //loading. If the only stillLoading is a\n              //plugin resource though, keep going,\n              //because it may be that a plugin resource\n              //is waiting on a non-plugin cycle.\n              return (needCycleCheck = false)\n            }\n          }\n        }\n      })\n\n      if (expired && noLoads.length) {\n        //If wait time expired, throw error of unloaded modules.\n        err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads)\n        err.contextName = context.contextName\n        return onError(err)\n      }\n\n      //Not expired, check for a cycle.\n      if (needCycleCheck) {\n        each(reqCalls, function (mod) {\n          breakCycle(mod, {}, {})\n        })\n      }\n\n      //If still waiting on loads, and the waiting load is something\n      //other than a plugin resource, or there are still outstanding\n      //scripts, then just try back later.\n      if ((!expired || usingPathFallback) && stillLoading) {\n        //Something is still waiting to load. Wait for it, but only\n        //if a timeout is not already in effect.\n        if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {\n          checkLoadedTimeoutId = setTimeout(function () {\n            checkLoadedTimeoutId = 0\n            checkLoaded()\n          }, 50)\n        }\n      }\n\n      inCheckLoaded = false\n    }\n\n    Module = function (map) {\n      this.events = getOwn(undefEvents, map.id) || {}\n      this.map = map\n      this.shim = getOwn(config.shim, map.id)\n      this.depExports = []\n      this.depMaps = []\n      this.depMatched = []\n      this.pluginMaps = {}\n      this.depCount = 0\n\n      /* this.exports this.factory\n               this.depMaps = [],\n               this.enabled, this.fetched\n            */\n    }\n\n    Module.prototype = {\n      init: function (depMaps, factory, errback, options) {\n        options = options || {}\n\n        //Do not do more inits if already done. Can happen if there\n        //are multiple define calls for the same module. That is not\n        //a normal, common case, but it is also not unexpected.\n        if (this.inited) {\n          return\n        }\n\n        this.factory = factory\n\n        if (errback) {\n          //Register for errors on this module.\n          this.on('error', errback)\n        } else if (this.events.error) {\n          //If no errback already, but there are error listeners\n          //on this module, set up an errback to pass to the deps.\n          errback = bind(this, function (err) {\n            this.emit('error', err)\n          })\n        }\n\n        //Do a copy of the dependency array, so that\n        //source inputs are not modified. For example\n        //\"shim\" deps are passed in here directly, and\n        //doing a direct modification of the depMaps array\n        //would affect that config.\n        this.depMaps = depMaps && depMaps.slice(0)\n\n        this.errback = errback\n\n        //Indicate this module has be initialized\n        this.inited = true\n\n        this.ignore = options.ignore\n\n        //Could have option to init this module in enabled mode,\n        //or could have been previously marked as enabled. However,\n        //the dependencies are not known until init is called. So\n        //if enabled previously, now trigger dependencies as enabled.\n        if (options.enabled || this.enabled) {\n          //Enable this module and dependencies.\n          //Will call this.check()\n          this.enable()\n        } else {\n          this.check()\n        }\n      },\n\n      defineDep: function (i, depExports) {\n        //Because of cycles, defined callback for a given\n        //export can be called more than once.\n        if (!this.depMatched[i]) {\n          this.depMatched[i] = true\n          this.depCount -= 1\n          this.depExports[i] = depExports\n        }\n      },\n\n      fetch: function () {\n        if (this.fetched) {\n          return\n        }\n        this.fetched = true\n\n        context.startTime = new Date().getTime()\n\n        var map = this.map\n\n        //If the manager is for a plugin managed resource,\n        //ask the plugin to load it now.\n        if (this.shim) {\n          context.makeRequire(this.map, {\n            enableBuildCallback: true,\n          })(\n            this.shim.deps || [],\n            bind(this, function () {\n              return map.prefix ? this.callPlugin() : this.load()\n            })\n          )\n        } else {\n          //Regular dependency.\n          return map.prefix ? this.callPlugin() : this.load()\n        }\n      },\n\n      load: function () {\n        var url = this.map.url\n\n        //Regular dependency.\n        if (!urlFetched[url]) {\n          urlFetched[url] = true\n          context.load(this.map.id, url)\n        }\n      },\n\n      /**\n       * Checks if the module is ready to define itself, and if so,\n       * define it.\n       */\n      check: function () {\n        if (!this.enabled || this.enabling) {\n          return\n        }\n\n        var err,\n          cjsModule,\n          id = this.map.id,\n          depExports = this.depExports,\n          exports = this.exports,\n          factory = this.factory\n\n        if (!this.inited) {\n          this.fetch()\n        } else if (this.error) {\n          this.emit('error', this.error)\n        } else if (!this.defining) {\n          //The factory could trigger another require call\n          //that would result in checking this module to\n          //define itself again. If already in the process\n          //of doing that, skip this work.\n          this.defining = true\n\n          if (this.depCount < 1 && !this.defined) {\n            if (isFunction(factory)) {\n              //If there is an error listener, favor passing\n              //to that instead of throwing an error. However,\n              //only do it for define()'d  modules. require\n              //errbacks should not be called for failures in\n              //their callbacks (#699). However if a global\n              //onError is set, use that.\n              if ((this.events.error && this.map.isDefine) || req.onError !== defaultOnError) {\n                try {\n                  exports = context.execCb(id, factory, depExports, exports)\n                } catch (e) {\n                  err = e\n                }\n              } else {\n                exports = context.execCb(id, factory, depExports, exports)\n              }\n\n              // Favor return value over exports. If node/cjs in play,\n              // then will not have a return value anyway. Favor\n              // module.exports assignment over exports object.\n              if (this.map.isDefine && exports === undefined) {\n                cjsModule = this.module\n                if (cjsModule) {\n                  exports = cjsModule.exports\n                } else if (this.usingExports) {\n                  //exports already set the defined value.\n                  exports = this.exports\n                }\n              }\n\n              if (err) {\n                err.requireMap = this.map\n                err.requireModules = this.map.isDefine ? [this.map.id] : null\n                err.requireType = this.map.isDefine ? 'define' : 'require'\n                return onError((this.error = err))\n              }\n            } else {\n              //Just a literal value\n              exports = factory\n            }\n\n            this.exports = exports\n\n            if (this.map.isDefine && !this.ignore) {\n              defined[id] = exports\n\n              if (req.onResourceLoad) {\n                req.onResourceLoad(context, this.map, this.depMaps)\n              }\n            }\n\n            //Clean up\n            cleanRegistry(id)\n\n            this.defined = true\n          }\n\n          //Finished the define stage. Allow calling check again\n          //to allow define notifications below in the case of a\n          //cycle.\n          this.defining = false\n\n          if (this.defined && !this.defineEmitted) {\n            this.defineEmitted = true\n            this.emit('defined', this.exports)\n            this.defineEmitComplete = true\n          }\n        }\n      },\n\n      callPlugin: function () {\n        var map = this.map,\n          id = map.id,\n          //Map already normalized the prefix.\n          pluginMap = makeModuleMap(map.prefix)\n\n        //Mark this as a dependency for this plugin, so it\n        //can be traced for cycles.\n        this.depMaps.push(pluginMap)\n\n        on(\n          pluginMap,\n          'defined',\n          bind(this, function (plugin) {\n            var load,\n              normalizedMap,\n              normalizedMod,\n              bundleId = getOwn(bundlesMap, this.map.id),\n              name = this.map.name,\n              parentName = this.map.parentMap ? this.map.parentMap.name : null,\n              localRequire = context.makeRequire(map.parentMap, {\n                enableBuildCallback: true,\n              })\n\n            //If current map is not normalized, wait for that\n            //normalized name to load instead of continuing.\n            if (this.map.unnormalized) {\n              //Normalize the ID if the plugin allows it.\n              if (plugin.normalize) {\n                name =\n                  plugin.normalize(name, function (name) {\n                    return normalize(name, parentName, true)\n                  }) || ''\n              }\n\n              //prefix and name should already be normalized, no need\n              //for applying map config again either.\n              normalizedMap = makeModuleMap(map.prefix + '!' + name, this.map.parentMap)\n              on(\n                normalizedMap,\n                'defined',\n                bind(this, function (value) {\n                  this.init(\n                    [],\n                    function () {\n                      return value\n                    },\n                    null,\n                    {\n                      enabled: true,\n                      ignore: true,\n                    }\n                  )\n                })\n              )\n\n              normalizedMod = getOwn(registry, normalizedMap.id)\n              if (normalizedMod) {\n                //Mark this as a dependency for this plugin, so it\n                //can be traced for cycles.\n                this.depMaps.push(normalizedMap)\n\n                if (this.events.error) {\n                  normalizedMod.on(\n                    'error',\n                    bind(this, function (err) {\n                      this.emit('error', err)\n                    })\n                  )\n                }\n                normalizedMod.enable()\n              }\n\n              return\n            }\n\n            //If a paths config, then just load that file instead to\n            //resolve the plugin, as it is built into that paths layer.\n            if (bundleId) {\n              this.map.url = context.nameToUrl(bundleId)\n              this.load()\n              return\n            }\n\n            load = bind(this, function (value) {\n              this.init(\n                [],\n                function () {\n                  return value\n                },\n                null,\n                {\n                  enabled: true,\n                }\n              )\n            })\n\n            load.error = bind(this, function (err) {\n              this.inited = true\n              this.error = err\n              err.requireModules = [id]\n\n              //Remove temp unnormalized modules for this module,\n              //since they will never be resolved otherwise now.\n              eachProp(registry, function (mod) {\n                if (mod.map.id.indexOf(id + '_unnormalized') === 0) {\n                  cleanRegistry(mod.map.id)\n                }\n              })\n\n              onError(err)\n            })\n\n            //Allow plugins to load other code without having to know the\n            //context or how to 'complete' the load.\n            load.fromText = bind(this, function (text, textAlt) {\n              /*jslint evil: true */\n              var moduleName = map.name,\n                moduleMap = makeModuleMap(moduleName),\n                hasInteractive = useInteractive\n\n              //As of 2.1.0, support just passing the text, to reinforce\n              //fromText only being called once per resource. Still\n              //support old style of passing moduleName but discard\n              //that moduleName in favor of the internal ref.\n              if (textAlt) {\n                text = textAlt\n              }\n\n              //Turn off interactive script matching for IE for any define\n              //calls in the text, then turn it back on at the end.\n              if (hasInteractive) {\n                useInteractive = false\n              }\n\n              //Prime the system by creating a module instance for\n              //it.\n              getModule(moduleMap)\n\n              //Transfer any config to this other module.\n              if (hasProp(config.config, id)) {\n                config.config[moduleName] = config.config[id]\n              }\n\n              try {\n                req.exec(text)\n              } catch (e) {\n                return onError(makeError('fromtexteval', 'fromText eval for ' + id + ' failed: ' + e, e, [id]))\n              }\n\n              if (hasInteractive) {\n                useInteractive = true\n              }\n\n              //Mark this as a dependency for the plugin\n              //resource\n              this.depMaps.push(moduleMap)\n\n              //Support anonymous modules.\n              context.completeLoad(moduleName)\n\n              //Bind the value of that module to the value for this\n              //resource ID.\n              localRequire([moduleName], load)\n            })\n\n            //Use parentName here since the plugin's name is not reliable,\n            //could be some weird string with no path that actually wants to\n            //reference the parentName's path.\n            plugin.load(map.name, localRequire, load, config)\n          })\n        )\n\n        context.enable(pluginMap, this)\n        this.pluginMaps[pluginMap.id] = pluginMap\n      },\n\n      enable: function () {\n        enabledRegistry[this.map.id] = this\n        this.enabled = true\n\n        //Set flag mentioning that the module is enabling,\n        //so that immediate calls to the defined callbacks\n        //for dependencies do not trigger inadvertent load\n        //with the depCount still being zero.\n        this.enabling = true\n\n        //Enable each dependency\n        each(\n          this.depMaps,\n          bind(this, function (depMap, i) {\n            var id, mod, handler\n\n            if (typeof depMap === 'string') {\n              //Dependency needs to be converted to a depMap\n              //and wired up to this module.\n              depMap = makeModuleMap(depMap, this.map.isDefine ? this.map : this.map.parentMap, false, !this.skipMap)\n              this.depMaps[i] = depMap\n\n              handler = getOwn(handlers, depMap.id)\n\n              if (handler) {\n                this.depExports[i] = handler(this)\n                return\n              }\n\n              this.depCount += 1\n\n              on(\n                depMap,\n                'defined',\n                bind(this, function (depExports) {\n                  this.defineDep(i, depExports)\n                  this.check()\n                })\n              )\n\n              if (this.errback) {\n                on(depMap, 'error', bind(this, this.errback))\n              } else if (this.events.error) {\n                // No direct errback on this module, but something\n                // else is listening for errors, so be sure to\n                // propagate the error correctly.\n                on(\n                  depMap,\n                  'error',\n                  bind(this, function (err) {\n                    this.emit('error', err)\n                  })\n                )\n              }\n            }\n\n            id = depMap.id\n            mod = registry[id]\n\n            //Skip special modules like 'require', 'exports', 'module'\n            //Also, don't call enable if it is already enabled,\n            //important in circular dependency cases.\n            if (!hasProp(handlers, id) && mod && !mod.enabled) {\n              context.enable(depMap, this)\n            }\n          })\n        )\n\n        //Enable each plugin that is used in\n        //a dependency\n        eachProp(\n          this.pluginMaps,\n          bind(this, function (pluginMap) {\n            var mod = getOwn(registry, pluginMap.id)\n            if (mod && !mod.enabled) {\n              context.enable(pluginMap, this)\n            }\n          })\n        )\n\n        this.enabling = false\n\n        this.check()\n      },\n\n      on: function (name, cb) {\n        var cbs = this.events[name]\n        if (!cbs) {\n          cbs = this.events[name] = []\n        }\n        cbs.push(cb)\n      },\n\n      emit: function (name, evt) {\n        each(this.events[name], function (cb) {\n          cb(evt)\n        })\n        if (name === 'error') {\n          //Now that the error handler was triggered, remove\n          //the listeners, since this broken Module instance\n          //can stay around for a while in the registry.\n          delete this.events[name]\n        }\n      },\n    }\n\n    function callGetModule(args) {\n      //Skip modules already defined.\n      if (!hasProp(defined, args[0])) {\n        getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2])\n      }\n    }\n\n    function removeListener(node, func, name, ieName) {\n      //Favor detachEvent because of IE9\n      //issue, see attachEvent/addEventListener comment elsewhere\n      //in this file.\n      if (node.detachEvent && !isOpera) {\n        //Probably IE. If not it will throw an error, which will be\n        //useful to know.\n        if (ieName) {\n          node.detachEvent(ieName, func)\n        }\n      } else {\n        node.removeEventListener(name, func, false)\n      }\n    }\n\n    /**\n     * Given an event from a script node, get the requirejs info from it,\n     * and then removes the event listeners on the node.\n     * @param {Event} evt\n     * @returns {Object}\n     */\n    function getScriptData(evt) {\n      //Using currentTarget instead of target for Firefox 2.0's sake. Not\n      //all old browsers will be supported, but this one was easy enough\n      //to support and still makes sense.\n      var node = evt.currentTarget || evt.srcElement\n\n      //Remove the listeners once here.\n      removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange')\n      removeListener(node, context.onScriptError, 'error')\n\n      return {\n        node: node,\n        id: node && node.getAttribute('data-requiremodule'),\n      }\n    }\n\n    function intakeDefines() {\n      var args\n\n      //Any defined modules in the global queue, intake them now.\n      takeGlobalQueue()\n\n      //Make sure any remaining defQueue items get properly processed.\n      while (defQueue.length) {\n        args = defQueue.shift()\n        if (args[0] === null) {\n          return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]))\n        } else {\n          //args are id, deps, factory. Should be normalized by the\n          //define() function.\n          callGetModule(args)\n        }\n      }\n    }\n\n    context = {\n      config: config,\n      contextName: contextName,\n      registry: registry,\n      defined: defined,\n      urlFetched: urlFetched,\n      defQueue: defQueue,\n      Module: Module,\n      makeModuleMap: makeModuleMap,\n      nextTick: req.nextTick,\n      onError: onError,\n\n      /**\n       * Set a configuration for the context.\n       * @param {Object} cfg config object to integrate.\n       */\n      configure: function (cfg) {\n        //Make sure the baseUrl ends in a slash.\n        if (cfg.baseUrl) {\n          if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {\n            cfg.baseUrl += '/'\n          }\n        }\n\n        //Save off the paths since they require special processing,\n        //they are additive.\n        var shim = config.shim,\n          objs = {\n            paths: true,\n            bundles: true,\n            config: true,\n            map: true,\n          }\n\n        eachProp(cfg, function (value, prop) {\n          if (objs[prop]) {\n            if (!config[prop]) {\n              config[prop] = {}\n            }\n            mixin(config[prop], value, true, true)\n          } else {\n            config[prop] = value\n          }\n        })\n\n        //Reverse map the bundles\n        if (cfg.bundles) {\n          eachProp(cfg.bundles, function (value, prop) {\n            each(value, function (v) {\n              if (v !== prop) {\n                bundlesMap[v] = prop\n              }\n            })\n          })\n        }\n\n        //Merge shim\n        if (cfg.shim) {\n          eachProp(cfg.shim, function (value, id) {\n            //Normalize the structure\n            if (isArray(value)) {\n              value = {\n                deps: value,\n              }\n            }\n            if ((value.exports || value.init) && !value.exportsFn) {\n              value.exportsFn = context.makeShimExports(value)\n            }\n            shim[id] = value\n          })\n          config.shim = shim\n        }\n\n        //Adjust packages if necessary.\n        if (cfg.packages) {\n          each(cfg.packages, function (pkgObj) {\n            var location, name\n\n            pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj\n\n            name = pkgObj.name\n            location = pkgObj.location\n            if (location) {\n              config.paths[name] = pkgObj.location\n            }\n\n            //Save pointer to main module ID for pkg name.\n            //Remove leading dot in main, so main paths are normalized,\n            //and remove any trailing .js, since different package\n            //envs have different conventions: some use a module name,\n            //some use a file name.\n            config.pkgs[name] =\n              pkgObj.name + '/' + (pkgObj.main || 'main').replace(currDirRegExp, '').replace(jsSuffixRegExp, '')\n          })\n        }\n\n        //If there are any \"waiting to execute\" modules in the registry,\n        //update the maps for them, since their info, like URLs to load,\n        //may have changed.\n        eachProp(registry, function (mod, id) {\n          //If module already has init called, since it is too\n          //late to modify them, and ignore unnormalized ones\n          //since they are transient.\n          if (!mod.inited && !mod.map.unnormalized) {\n            mod.map = makeModuleMap(id)\n          }\n        })\n\n        //If a deps array or a config callback is specified, then call\n        //require with those args. This is useful when require is defined as a\n        //config object before require.js is loaded.\n        if (cfg.deps || cfg.callback) {\n          context.require(cfg.deps || [], cfg.callback)\n        }\n      },\n\n      makeShimExports: function (value) {\n        function fn() {\n          var ret\n          if (value.init) {\n            ret = value.init.apply(global, arguments)\n          }\n          return ret || (value.exports && getGlobal(value.exports))\n        }\n        return fn\n      },\n\n      makeRequire: function (relMap, options) {\n        options = options || {}\n\n        function localRequire(deps, callback, errback) {\n          var id, map, requireMod\n\n          if (options.enableBuildCallback && callback && isFunction(callback)) {\n            callback.__requireJsBuild = true\n          }\n\n          if (typeof deps === 'string') {\n            if (isFunction(callback)) {\n              //Invalid call\n              return onError(makeError('requireargs', 'Invalid require call'), errback)\n            }\n\n            //If require|exports|module are requested, get the\n            //value for them from the special handlers. Caveat:\n            //this only works while module is being defined.\n            if (relMap && hasProp(handlers, deps)) {\n              return handlers[deps](registry[relMap.id])\n            }\n\n            //Synchronous access to one module. If require.get is\n            //available (as in the Node adapter), prefer that.\n            if (req.get) {\n              return req.get(context, deps, relMap, localRequire)\n            }\n\n            //Normalize module name, if it contains . or ..\n            map = makeModuleMap(deps, relMap, false, true)\n            id = map.id\n\n            if (!hasProp(defined, id)) {\n              return onError(\n                makeError(\n                  'notloaded',\n                  'Module name \"' +\n                    id +\n                    '\" has not been loaded yet for context: ' +\n                    contextName +\n                    (relMap ? '' : '. Use require([])')\n                )\n              )\n            }\n            return defined[id]\n          }\n\n          //Grab defines waiting in the global queue.\n          intakeDefines()\n\n          //Mark all the dependencies as needing to be loaded.\n          context.nextTick(function () {\n            //Some defines could have been added since the\n            //require call, collect them.\n            intakeDefines()\n\n            requireMod = getModule(makeModuleMap(null, relMap))\n\n            //Store if map config should be applied to this require\n            //call for dependencies.\n            requireMod.skipMap = options.skipMap\n\n            requireMod.init(deps, callback, errback, {\n              enabled: true,\n            })\n\n            checkLoaded()\n          })\n\n          return localRequire\n        }\n\n        mixin(localRequire, {\n          isBrowser: isBrowser,\n\n          /**\n           * Converts a module name + .extension into an URL path.\n           * *Requires* the use of a module name. It does not support using\n           * plain URLs like nameToUrl.\n           */\n          toUrl: function (moduleNamePlusExt) {\n            var ext,\n              index = moduleNamePlusExt.lastIndexOf('.'),\n              segment = moduleNamePlusExt.split('/')[0],\n              isRelative = segment === '.' || segment === '..'\n\n            //Have a file extension alias, and it is not the\n            //dots from a relative path.\n            if (index !== -1 && (!isRelative || index > 1)) {\n              ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length)\n              moduleNamePlusExt = moduleNamePlusExt.substring(0, index)\n            }\n\n            return context.nameToUrl(normalize(moduleNamePlusExt, relMap && relMap.id, true), ext, true)\n          },\n\n          defined: function (id) {\n            return hasProp(defined, makeModuleMap(id, relMap, false, true).id)\n          },\n\n          specified: function (id) {\n            id = makeModuleMap(id, relMap, false, true).id\n            return hasProp(defined, id) || hasProp(registry, id)\n          },\n        })\n\n        //Only allow undef on top level require calls\n        if (!relMap) {\n          localRequire.undef = function (id) {\n            //Bind any waiting define() calls to this context,\n            //fix for #408\n            takeGlobalQueue()\n\n            var map = makeModuleMap(id, relMap, true),\n              mod = getOwn(registry, id)\n\n            removeScript(id)\n\n            delete defined[id]\n            delete urlFetched[map.url]\n            delete undefEvents[id]\n\n            //Clean queued defines too. Go backwards\n            //in array so that the splices do not\n            //mess up the iteration.\n            eachReverse(defQueue, function (args, i) {\n              if (args[0] === id) {\n                defQueue.splice(i, 1)\n              }\n            })\n\n            if (mod) {\n              //Hold on to listeners in case the\n              //module will be attempted to be reloaded\n              //using a different config.\n              if (mod.events.defined) {\n                undefEvents[id] = mod.events\n              }\n\n              cleanRegistry(id)\n            }\n          }\n        }\n\n        return localRequire\n      },\n\n      /**\n       * Called to enable a module if it is still in the registry\n       * awaiting enablement. A second arg, parent, the parent module,\n       * is passed in for context, when this method is overridden by\n       * the optimizer. Not shown here to keep code compact.\n       */\n      enable: function (depMap) {\n        var mod = getOwn(registry, depMap.id)\n        if (mod) {\n          getModule(depMap).enable()\n        }\n      },\n\n      /**\n       * Internal method used by environment adapters to complete a load event.\n       * A load event could be a script load or just a load pass from a synchronous\n       * load call.\n       * @param {String} moduleName the name of the module to potentially complete.\n       */\n      completeLoad: function (moduleName) {\n        var found,\n          args,\n          mod,\n          shim = getOwn(config.shim, moduleName) || {},\n          shExports = shim.exports\n\n        takeGlobalQueue()\n\n        while (defQueue.length) {\n          args = defQueue.shift()\n          if (args[0] === null) {\n            args[0] = moduleName\n            //If already found an anonymous module and bound it\n            //to this name, then this is some other anon module\n            //waiting for its completeLoad to fire.\n            if (found) {\n              break\n            }\n            found = true\n          } else if (args[0] === moduleName) {\n            //Found matching define call for this script!\n            found = true\n          }\n\n          callGetModule(args)\n        }\n\n        //Do this after the cycle of callGetModule in case the result\n        //of those calls/init calls changes the registry.\n        mod = getOwn(registry, moduleName)\n\n        if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {\n          if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {\n            if (hasPathFallback(moduleName)) {\n              return\n            } else {\n              return onError(makeError('nodefine', 'No define call for ' + moduleName, null, [moduleName]))\n            }\n          } else {\n            //A script that does not call define(), so just simulate\n            //the call for it.\n            callGetModule([moduleName, shim.deps || [], shim.exportsFn])\n          }\n        }\n\n        checkLoaded()\n      },\n\n      /**\n       * Converts a module name to a file path. Supports cases where\n       * moduleName may actually be just an URL.\n       * Note that it **does not** call normalize on the moduleName,\n       * it is assumed to have already been normalized. This is an\n       * internal API, not a public one. Use toUrl for the public API.\n       */\n      nameToUrl: function (moduleName, ext, skipExt) {\n        var paths,\n          syms,\n          i,\n          parentModule,\n          url,\n          parentPath,\n          bundleId,\n          pkgMain = getOwn(config.pkgs, moduleName)\n\n        if (pkgMain) {\n          moduleName = pkgMain\n        }\n\n        bundleId = getOwn(bundlesMap, moduleName)\n\n        if (bundleId) {\n          return context.nameToUrl(bundleId, ext, skipExt)\n        }\n\n        //If a colon is in the URL, it indicates a protocol is used and it is just\n        //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)\n        //or ends with .js, then assume the user meant to use an url and not a module id.\n        //The slash is important for protocol-less URLs as well as full paths.\n        if (req.jsExtRegExp.test(moduleName)) {\n          //Just a plain path, not module name lookup, so just return it.\n          //Add extension if it is included. This is a bit wonky, only non-.js things pass\n          //an extension, this method probably needs to be reworked.\n          url = moduleName + (ext || '')\n        } else {\n          //A module that needs to be converted to a path.\n          paths = config.paths\n\n          syms = moduleName.split('/')\n          //For each module name segment, see if there is a path\n          //registered for it. Start with most specific name\n          //and work up from it.\n          for (i = syms.length; i > 0; i -= 1) {\n            parentModule = syms.slice(0, i).join('/')\n\n            parentPath = getOwn(paths, parentModule)\n            if (parentPath) {\n              //If an array, it means there are a few choices,\n              //Choose the one that is desired\n              if (isArray(parentPath)) {\n                parentPath = parentPath[0]\n              }\n              syms.splice(0, i, parentPath)\n              break\n            }\n          }\n\n          //Join the path parts together, then figure out if baseUrl is needed.\n          url = syms.join('/')\n          url += ext || (/^data\\:|\\?/.test(url) || skipExt ? '' : '.js')\n          url = (url.charAt(0) === '/' || url.match(/^[\\w\\+\\.\\-]+:/) ? '' : config.baseUrl) + url\n        }\n\n        return config.urlArgs ? url + ((url.indexOf('?') === -1 ? '?' : '&') + config.urlArgs) : url\n      },\n\n      //Delegates to req.load. Broken out as a separate function to\n      //allow overriding in the optimizer.\n      load: function (id, url) {\n        req.load(context, id, url)\n      },\n\n      /**\n       * Executes a module callback function. Broken out as a separate function\n       * solely to allow the build system to sequence the files in the built\n       * layer in the right sequence.\n       *\n       * @private\n       */\n      execCb: function (name, callback, args, exports) {\n        return callback.apply(exports, args)\n      },\n\n      /**\n       * callback for script loads, used to check status of loading.\n       *\n       * @param {Event} evt the event from the browser for the script\n       * that was loaded.\n       */\n      onScriptLoad: function (evt) {\n        //Using currentTarget instead of target for Firefox 2.0's sake. Not\n        //all old browsers will be supported, but this one was easy enough\n        //to support and still makes sense.\n        if (evt.type === 'load' || readyRegExp.test((evt.currentTarget || evt.srcElement).readyState)) {\n          //Reset interactive script so a script node is not held onto for\n          //to long.\n          interactiveScript = null\n\n          //Pull out the name of the module and the context.\n          var data = getScriptData(evt)\n          context.completeLoad(data.id)\n        }\n      },\n\n      /**\n       * Callback for script errors.\n       */\n      onScriptError: function (evt) {\n        var data = getScriptData(evt)\n        if (!hasPathFallback(data.id)) {\n          return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]))\n        }\n      },\n    }\n\n    context.require = context.makeRequire()\n    return context\n  }\n\n  /**\n   * Main entry point.\n   *\n   * If the only argument to require is a string, then the module that\n   * is represented by that string is fetched for the appropriate context.\n   *\n   * If the first argument is an array, then it will be treated as an array\n   * of dependency string names to fetch. An optional function callback can\n   * be specified to execute when all of those dependencies are available.\n   *\n   * Make a local req variable to help Caja compliance (it assumes things\n   * on a require that are not standardized), and to give a short\n   * name for minification/local scope use.\n   */\n  req = requirejs = function (deps, callback, errback, optional) {\n    //Find the right context, use default\n    var context,\n      config,\n      contextName = defContextName\n\n    // Determine if have config object in the call.\n    if (!isArray(deps) && typeof deps !== 'string') {\n      // deps is a config object\n      config = deps\n      if (isArray(callback)) {\n        // Adjust args if there are dependencies\n        deps = callback\n        callback = errback\n        errback = optional\n      } else {\n        deps = []\n      }\n    }\n\n    if (config && config.context) {\n      contextName = config.context\n    }\n\n    context = getOwn(contexts, contextName)\n    if (!context) {\n      context = contexts[contextName] = req.s.newContext(contextName)\n    }\n\n    if (config) {\n      context.configure(config)\n    }\n\n    return context.require(deps, callback, errback)\n  }\n\n  /**\n   * Support require.config() to make it easier to cooperate with other\n   * AMD loaders on globally agreed names.\n   */\n  req.config = function (config) {\n    return req(config)\n  }\n\n  /**\n   * Execute something after the current tick\n   * of the event loop. Override for other envs\n   * that have a better solution than setTimeout.\n   * @param  {Function} fn function to execute later.\n   */\n  req.nextTick =\n    typeof setTimeout !== 'undefined'\n      ? function (fn) {\n          setTimeout(fn, 4)\n        }\n      : function (fn) {\n          fn()\n        }\n\n  /**\n   * Export require as a global, but only if it does not already exist.\n   */\n  if (!require) {\n    require = req\n  }\n\n  req.version = version\n\n  //Used to filter out dependencies that are already paths.\n  req.jsExtRegExp = /^\\/|:|\\?|\\.js$/\n  req.isBrowser = isBrowser\n  s = req.s = {\n    contexts: contexts,\n    newContext: newContext,\n  }\n\n  //Create default context.\n  req({})\n\n  //Exports some context-sensitive methods on global require.\n  each(['toUrl', 'undef', 'defined', 'specified'], function (prop) {\n    //Reference from contexts instead of early binding to default context,\n    //so that during builds, the latest instance of the default context\n    //with its config gets used.\n    req[prop] = function () {\n      var ctx = contexts[defContextName]\n      return ctx.require[prop].apply(ctx, arguments)\n    }\n  })\n\n  if (isBrowser) {\n    head = s.head = document.getElementsByTagName('head')[0]\n    //If BASE tag is in play, using appendChild is a problem for IE6.\n    //When that browser dies, this can be removed. Details in this jQuery bug:\n    //http://dev.jquery.com/ticket/2709\n    baseElement = document.getElementsByTagName('base')[0]\n    if (baseElement) {\n      head = s.head = baseElement.parentNode\n    }\n  }\n\n  /**\n   * Any errors that require explicitly generates will be passed to this\n   * function. Intercept/override it if you want custom error handling.\n   * @param {Error} err the error object.\n   */\n  req.onError = defaultOnError\n\n  /**\n   * Creates the node for the load command. Only used in browser envs.\n   */\n  req.createNode = function (config, moduleName, url) {\n    var node = config.xhtml\n      ? document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script')\n      : document.createElement('script')\n    node.type = config.scriptType || 'text/javascript'\n    node.charset = 'utf-8'\n    node.async = true\n    return node\n  }\n\n  /**\n   * Does the request to load a module for the browser case.\n   * Make this a separate function to allow other environments\n   * to override it.\n   *\n   * @param {Object} context the require context to find state.\n   * @param {String} moduleName the name of the module.\n   * @param {Object} url the URL to the module.\n   */\n  req.load = function (context, moduleName, url) {\n    var config = (context && context.config) || {},\n      node\n    if (isBrowser) {\n      //In the browser so use a script tag\n      node = req.createNode(config, moduleName, url)\n\n      node.setAttribute('data-requirecontext', context.contextName)\n      node.setAttribute('data-requiremodule', moduleName)\n\n      //Set up load listener. Test attachEvent first because IE9 has\n      //a subtle issue in its addEventListener and script onload firings\n      //that do not match the behavior of all other browsers with\n      //addEventListener support, which fire the onload event for a\n      //script right after the script execution. See:\n      //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution\n      //UNFORTUNATELY Opera implements attachEvent but does not follow the script\n      //script execution mode.\n      if (\n        node.attachEvent &&\n        //Check if node.attachEvent is artificially added by custom script or\n        //natively supported by browser\n        //read https://github.com/jrburke/requirejs/issues/187\n        //if we can NOT find [native code] then it must NOT natively supported.\n        //in IE8, node.attachEvent does not have toString()\n        //Note the test for \"[native code\" with no closing brace, see:\n        //https://github.com/jrburke/requirejs/issues/273\n        !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&\n        !isOpera\n      ) {\n        //Probably IE. IE (at least 6-8) do not fire\n        //script onload right after executing the script, so\n        //we cannot tie the anonymous define call to a name.\n        //However, IE reports the script as being in 'interactive'\n        //readyState at the time of the define call.\n        useInteractive = true\n\n        node.attachEvent('onreadystatechange', context.onScriptLoad)\n        //It would be great to add an error handler here to catch\n        //404s in IE9+. However, onreadystatechange will fire before\n        //the error handler, so that does not help. If addEventListener\n        //is used, then IE will fire error before load, but we cannot\n        //use that pathway given the connect.microsoft.com issue\n        //mentioned above about not doing the 'script execute,\n        //then fire the script load event listener before execute\n        //next script' that other browsers do.\n        //Best hope: IE10 fixes the issues,\n        //and then destroys all installs of IE 6-9.\n        //node.attachEvent('onerror', context.onScriptError);\n      } else {\n        node.addEventListener('load', context.onScriptLoad, false)\n        node.addEventListener('error', context.onScriptError, false)\n      }\n      node.src = url\n\n      //For some cache cases in IE 6-8, the script executes before the end\n      //of the appendChild execution, so to tie an anonymous define\n      //call to the module name (which is stored on the node), hold on\n      //to a reference to this node, but clear after the DOM insertion.\n      currentlyAddingScript = node\n      if (baseElement) {\n        head.insertbeforeAll(node, baseElement)\n      } else {\n        head.appendChild(node)\n      }\n      currentlyAddingScript = null\n\n      return node\n    } else if (isWebWorker) {\n      try {\n        //In a web worker, use importScripts. This is not a very\n        //efficient use of importScripts, importScripts will block until\n        //its script is downloaded and evaluated. However, if web workers\n        //are in play, the expectation that a build has been done so that\n        //only one script needs to be loaded anyway. This may need to be\n        //reevaluated if other use cases become common.\n        importScripts(url)\n\n        //Account for anonymous modules\n        context.completeLoad(moduleName)\n      } catch (e) {\n        context.onError(\n          makeError('importscripts', 'importScripts failed for ' + moduleName + ' at ' + url, e, [moduleName])\n        )\n      }\n    }\n  }\n\n  function getInteractiveScript() {\n    if (interactiveScript && interactiveScript.readyState === 'interactive') {\n      return interactiveScript\n    }\n\n    eachReverse(scripts(), function (script) {\n      if (script.readyState === 'interactive') {\n        return (interactiveScript = script)\n      }\n    })\n    return interactiveScript\n  }\n\n  //Look for a data-main script attribute, which could also adjust the baseUrl.\n  if (isBrowser && !cfg.skipDataMain) {\n    //Figure out baseUrl. Get it from the script tag with require.js in it.\n    eachReverse(scripts(), function (script) {\n      //Set the 'head' where we can append children by\n      //using the script's parent.\n      if (!head) {\n        head = script.parentNode\n      }\n\n      //Look for a data-main attribute to set main script for the page\n      //to load. If it is there, the path to data main becomes the\n      //baseUrl, if it is not already set.\n      dataMain = script.getAttribute('data-main')\n      if (dataMain) {\n        //Preserve dataMain in case it is a path (i.e. contains '?')\n        mainScript = dataMain\n\n        //Set final baseUrl if there is not already an explicit one.\n        if (!cfg.baseUrl) {\n          //Pull off the directory of data-main for use as the\n          //baseUrl.\n          src = mainScript.split('/')\n          mainScript = src.pop()\n          subPath = src.length ? src.join('/') + '/' : './'\n\n          cfg.baseUrl = subPath\n        }\n\n        //Strip off any trailing .js since mainScript is now\n        //like a module name.\n        mainScript = mainScript.replace(jsSuffixRegExp, '')\n\n        //If mainScript is still a path, fall back to dataMain\n        if (req.jsExtRegExp.test(mainScript)) {\n          mainScript = dataMain\n        }\n\n        //Put the data-main script in the files to load.\n        cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]\n\n        return true\n      }\n    })\n  }\n\n  /**\n   * The function that handles definitions of modules. Differs from\n   * require() in that a string for the module should be the first argument,\n   * and the function to execute after dependencies are loaded should\n   * return a value to define the module corresponding to the first argument's\n   * name.\n   */\n  define = function (name, deps, callback) {\n    var node, context\n\n    //Allow for anonymous modules\n    if (typeof name !== 'string') {\n      //Adjust args appropriately\n      callback = deps\n      deps = name\n      name = null\n    }\n\n    //This module may not have dependencies\n    if (!isArray(deps)) {\n      callback = deps\n      deps = null\n    }\n\n    //If no name, and callback is a function, then figure out if it a\n    //CommonJS thing with dependencies.\n    if (!deps && isFunction(callback)) {\n      deps = []\n      //Remove comments from the callback string,\n      //look for require calls, and pull them into the dependencies,\n      //but only if there are function args.\n      if (callback.length) {\n        callback\n          .toString()\n          .replace(commentRegExp, '')\n          .replace(cjsRequireRegExp, function (match, dep) {\n            deps.push(dep)\n          })\n\n        //May be a CommonJS thing even without require calls, but still\n        //could use exports, and module. Avoid doing exports and module\n        //work though if it just needs require.\n        //REQUIRES the function to expect the CommonJS variables in the\n        //order listed below.\n        deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps)\n      }\n    }\n\n    //If in IE 6-8 and hit an anonymous define() call, do the interactive\n    //work.\n    if (useInteractive) {\n      node = currentlyAddingScript || getInteractiveScript()\n      if (node) {\n        if (!name) {\n          name = node.getAttribute('data-requiremodule')\n        }\n        context = contexts[node.getAttribute('data-requirecontext')]\n      }\n    }\n\n    //Always save off evaluating the def call until the script onload handler.\n    //This allows multiple modules to be in a file without prematurely\n    //tracing dependencies, and allows for anonymous module support,\n    //where the module name is not known until the script onload event\n    //occurs. If no context, use the global queue, and get it processed\n    //in the onscript load callback.\n    ;(context ? context.defQueue : globalDefQueue).push([name, deps, callback])\n  }\n\n  define.amd = {\n    jQuery: true,\n  }\n\n  /**\n   * Executes the text. Normally just uses eval, but can be modified\n   * to use a better, environment-specific call. Only used for transpiling\n   * loader plugins, not for plain JS modules.\n   * @param {String} text the text to execute/evaluate.\n   */\n  req.exec = function (text) {\n    /*jslint evil: true */\n    return eval(text)\n  }\n\n  //Set up with config info.\n  req(cfg)\n})(this)\n"
  },
  {
    "path": "__test__/usage/style.css",
    "content": "    .list {\n      font-family:sans-serif;\n      margin:0;\n      padding:20px 0 0;\n    }\n    .list > li {\n      display:block;\n      background-color: #eee;\n      padding:10px;\n      box-shadow: inset 0 1px 0 #fff;\n    }\n    .avatar {\n      max-width: 150px;\n    }\n    img {\n      max-width: 100%;\n    }\n    h3 {\n      font-size: 16px;\n      margin:0 0 0.3rem;\n      font-weight: normal;\n      font-weight:bold;\n    }\n    p {\n      margin:0;\n    }\n\n    input {\n      border:solid 1px #ccc;\n      border-radius: 5px;\n      padding:7px 14px;\n      margin-bottom:10px\n    }\n    input:focus {\n      outline:none;\n      border-color:#aaa;\n    }\n    .sort {\n      padding:8px 30px;\n      border-radius: 6px;\n      border:none;\n      display:inline-block;\n      color:#fff;\n      text-decoration: none;\n      background-color: #28a8e0;\n      height:30px;\n    }\n    .sort:hover {\n      text-decoration: none;\n      background-color:#1b8aba;\n    }\n    .sort:focus {\n      outline:none;\n    }\n    .sort:after {\n      width: 0;\n      height: 0;\n      border-left: 5px solid transparent;\n      border-right: 5px solid transparent;\n      border-bottom: 5px solid transparent;\n      content:\"\";\n      position: relative;\n      top:-10px;\n      right:-5px;\n    }\n    .sort.asc:after {\n      width: 0;\n      height: 0;\n      border-left: 5px solid transparent;\n      border-right: 5px solid transparent;\n      border-top: 5px solid #fff;\n      content:\"\";\n      position: relative;\n      top:13px;\n      right:-5px;\n    }\n    .sort.desc:after {\n      width: 0;\n      height: 0;\n      border-left: 5px solid transparent;\n      border-right: 5px solid transparent;\n      border-bottom: 5px solid #fff;\n      content:\"\";\n      position: relative;\n      top:-10px;\n      right:-5px;\n    }\n"
  },
  {
    "path": "__test__/utils.classes.test.js",
    "content": "const classes = require('../src/utils/classes')\n\ndescribe('Classes', function () {\n  var el\n\n  beforeEach(function () {\n    el = document.createElement('div')\n    document.body.appendChild(el)\n  })\n\n  afterEach(function () {\n    document.body.removeChild(el)\n  })\n\n  it('should add', function () {\n    classes(el).add('show')\n    expect(el.getAttribute('class')).toBe('show')\n  })\n  it('should remove', function () {\n    el.setAttribute('class', 'show')\n    expect(el.getAttribute('class')).toBe('show')\n    classes(el).remove('show')\n    expect(el.getAttribute('class')).toBe('')\n  })\n  it('should toggle', function () {\n    classes(el).toggle('show')\n    expect(el.getAttribute('class')).toBe('show')\n    classes(el).toggle('show')\n    expect(el.getAttribute('class')).toBe('')\n  })\n  it('should array', function () {\n    el.setAttribute('class', 'foo bar')\n    expect(classes(el).array()).toEqual(['foo', 'bar'])\n  })\n  it('should has', function () {\n    expect(classes(el).has('show')).toBe(false)\n    el.setAttribute('class', 'show')\n    expect(classes(el).has('show')).toBe(true)\n  })\n  it('should contains', function () {\n    expect(classes(el).contains('show')).toBe(false)\n    el.setAttribute('class', 'show')\n    expect(classes(el).contains('show')).toBe(true)\n  })\n})\n"
  },
  {
    "path": "__test__/utils.get-by-class.test.js",
    "content": "const getByClass = require('../src/utils/get-by-class')\n\ndescribe('GetByClass', function () {\n  var el\n\n  beforeEach(function () {\n    el = document.createElement('div')\n    el.setAttribute('class', 'foo')\n    document.body.appendChild(el)\n  })\n\n  afterEach(function () {\n    document.body.removeChild(el)\n  })\n\n  it('should use getElementsByClassName', function () {\n    expect(getByClass(document.body, 'foo', false, { test: true, getElementsByClassName: true }).length).toBe(1)\n  })\n  it('should use getElementsByClassName', function () {\n    expect(getByClass(document.body, 'foo', false, { test: true, querySelector: true }).length).toBe(1)\n  })\n  it('should toggle', function () {\n    expect(getByClass(document.body, 'foo', false, { test: true, polyfill: true }).length).toBe(1)\n  })\n})\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"list.js\",\n  \"main\": \"dist/list.js\",\n  \"homepage\": \"https://listjs.com\",\n  \"authors\": [\n    \"Jonny Strömberg <jonny.stromberg@gmail.com>\"\n  ],\n  \"description\": \"The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML\",\n  \"keywords\": [\n    \"list\",\n    \"search\",\n    \"sort\",\n    \"table\",\n    \"dom\",\n    \"html\",\n    \"ui\"\n  ],\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"**/.*\",\n    \"node_modules\",\n    \"__test__\",\n    \"docs\"\n  ]\n}\n"
  },
  {
    "path": "dist/list.js",
    "content": "var List;List =\n/******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./src/add-async.js\":\n/*!**************************!*\\\n  !*** ./src/add-async.js ***!\n  \\**************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (list) {\n  var addAsync = function addAsync(values, callback, items) {\n    var valuesToAdd = values.splice(0, 50);\n    items = items || [];\n    items = items.concat(list.add(valuesToAdd));\n\n    if (values.length > 0) {\n      setTimeout(function () {\n        addAsync(values, callback, items);\n      }, 1);\n    } else {\n      list.update();\n      callback(items);\n    }\n  };\n\n  return addAsync;\n};\n\n/***/ }),\n\n/***/ \"./src/filter.js\":\n/*!***********************!*\\\n  !*** ./src/filter.js ***!\n  \\***********************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (list) {\n  // Add handlers\n  list.handlers.filterStart = list.handlers.filterStart || [];\n  list.handlers.filterComplete = list.handlers.filterComplete || [];\n  return function (filterFunction) {\n    list.trigger('filterStart');\n    list.i = 1; // Reset paging\n\n    list.reset.filter();\n\n    if (filterFunction === undefined) {\n      list.filtered = false;\n    } else {\n      list.filtered = true;\n      var is = list.items;\n\n      for (var i = 0, il = is.length; i < il; i++) {\n        var item = is[i];\n\n        if (filterFunction(item)) {\n          item.filtered = true;\n        } else {\n          item.filtered = false;\n        }\n      }\n    }\n\n    list.update();\n    list.trigger('filterComplete');\n    return list.visibleItems;\n  };\n};\n\n/***/ }),\n\n/***/ \"./src/fuzzy-search.js\":\n/*!*****************************!*\\\n  !*** ./src/fuzzy-search.js ***!\n  \\*****************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module, __webpack_require__ */\n/*! CommonJS bailout: module.exports is used directly at 8:0-14 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar classes = __webpack_require__(/*! ./utils/classes */ \"./src/utils/classes.js\"),\n    events = __webpack_require__(/*! ./utils/events */ \"./src/utils/events.js\"),\n    extend = __webpack_require__(/*! ./utils/extend */ \"./src/utils/extend.js\"),\n    toString = __webpack_require__(/*! ./utils/to-string */ \"./src/utils/to-string.js\"),\n    getByClass = __webpack_require__(/*! ./utils/get-by-class */ \"./src/utils/get-by-class.js\"),\n    fuzzy = __webpack_require__(/*! ./utils/fuzzy */ \"./src/utils/fuzzy.js\");\n\nmodule.exports = function (list, options) {\n  options = options || {};\n  options = extend({\n    location: 0,\n    distance: 100,\n    threshold: 0.4,\n    multiSearch: true,\n    searchClass: 'fuzzy-search'\n  }, options);\n  var fuzzySearch = {\n    search: function search(searchString, columns) {\n      // Substract arguments from the searchString or put searchString as only argument\n      var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString];\n\n      for (var k = 0, kl = list.items.length; k < kl; k++) {\n        fuzzySearch.item(list.items[k], columns, searchArguments);\n      }\n    },\n    item: function item(_item, columns, searchArguments) {\n      var found = true;\n\n      for (var i = 0; i < searchArguments.length; i++) {\n        var foundArgument = false;\n\n        for (var j = 0, jl = columns.length; j < jl; j++) {\n          if (fuzzySearch.values(_item.values(), columns[j], searchArguments[i])) {\n            foundArgument = true;\n          }\n        }\n\n        if (!foundArgument) {\n          found = false;\n        }\n      }\n\n      _item.found = found;\n    },\n    values: function values(_values, value, searchArgument) {\n      if (_values.hasOwnProperty(value)) {\n        var text = toString(_values[value]).toLowerCase();\n\n        if (fuzzy(text, searchArgument, options)) {\n          return true;\n        }\n      }\n\n      return false;\n    }\n  };\n  events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', list.utils.events.debounce(function (e) {\n    var target = e.target || e.srcElement; // IE have srcElement\n\n    list.search(target.value, fuzzySearch.search);\n  }, list.searchDelay));\n  return function (str, columns) {\n    list.search(str, columns, fuzzySearch.search);\n  };\n};\n\n/***/ }),\n\n/***/ \"./src/index.js\":\n/*!**********************!*\\\n  !*** ./src/index.js ***!\n  \\**********************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module, __webpack_require__ */\n/*! CommonJS bailout: module.exports is used directly at 11:0-14 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar naturalSort = __webpack_require__(/*! string-natural-compare */ \"./node_modules/string-natural-compare/natural-compare.js\"),\n    getByClass = __webpack_require__(/*! ./utils/get-by-class */ \"./src/utils/get-by-class.js\"),\n    extend = __webpack_require__(/*! ./utils/extend */ \"./src/utils/extend.js\"),\n    indexOf = __webpack_require__(/*! ./utils/index-of */ \"./src/utils/index-of.js\"),\n    events = __webpack_require__(/*! ./utils/events */ \"./src/utils/events.js\"),\n    toString = __webpack_require__(/*! ./utils/to-string */ \"./src/utils/to-string.js\"),\n    classes = __webpack_require__(/*! ./utils/classes */ \"./src/utils/classes.js\"),\n    getAttribute = __webpack_require__(/*! ./utils/get-attribute */ \"./src/utils/get-attribute.js\"),\n    toArray = __webpack_require__(/*! ./utils/to-array */ \"./src/utils/to-array.js\");\n\nmodule.exports = function (id, options, values) {\n  var self = this,\n      init,\n      Item = __webpack_require__(/*! ./item */ \"./src/item.js\")(self),\n      addAsync = __webpack_require__(/*! ./add-async */ \"./src/add-async.js\")(self),\n      initPagination = __webpack_require__(/*! ./pagination */ \"./src/pagination.js\")(self);\n\n  init = {\n    start: function start() {\n      self.listClass = 'list';\n      self.searchClass = 'search';\n      self.sortClass = 'sort';\n      self.page = 10000;\n      self.i = 1;\n      self.items = [];\n      self.visibleItems = [];\n      self.matchingItems = [];\n      self.searched = false;\n      self.filtered = false;\n      self.searchColumns = undefined;\n      self.searchDelay = 0;\n      self.handlers = {\n        updated: []\n      };\n      self.valueNames = [];\n      self.utils = {\n        getByClass: getByClass,\n        extend: extend,\n        indexOf: indexOf,\n        events: events,\n        toString: toString,\n        naturalSort: naturalSort,\n        classes: classes,\n        getAttribute: getAttribute,\n        toArray: toArray\n      };\n      self.utils.extend(self, options);\n      self.listContainer = typeof id === 'string' ? document.getElementById(id) : id;\n\n      if (!self.listContainer) {\n        return;\n      }\n\n      self.list = getByClass(self.listContainer, self.listClass, true);\n      self.parse = __webpack_require__(/*! ./parse */ \"./src/parse.js\")(self);\n      self.templater = __webpack_require__(/*! ./templater */ \"./src/templater.js\")(self);\n      self.search = __webpack_require__(/*! ./search */ \"./src/search.js\")(self);\n      self.filter = __webpack_require__(/*! ./filter */ \"./src/filter.js\")(self);\n      self.sort = __webpack_require__(/*! ./sort */ \"./src/sort.js\")(self);\n      self.fuzzySearch = __webpack_require__(/*! ./fuzzy-search */ \"./src/fuzzy-search.js\")(self, options.fuzzySearch);\n      this.handlers();\n      this.items();\n      this.pagination();\n      self.update();\n    },\n    handlers: function handlers() {\n      for (var handler in self.handlers) {\n        if (self[handler] && self.handlers.hasOwnProperty(handler)) {\n          self.on(handler, self[handler]);\n        }\n      }\n    },\n    items: function items() {\n      self.parse(self.list);\n\n      if (values !== undefined) {\n        self.add(values);\n      }\n    },\n    pagination: function pagination() {\n      if (options.pagination !== undefined) {\n        if (options.pagination === true) {\n          options.pagination = [{}];\n        }\n\n        if (options.pagination[0] === undefined) {\n          options.pagination = [options.pagination];\n        }\n\n        for (var i = 0, il = options.pagination.length; i < il; i++) {\n          initPagination(options.pagination[i]);\n        }\n      }\n    }\n  };\n  /*\n   * Re-parse the List, use if html have changed\n   */\n\n  this.reIndex = function () {\n    self.items = [];\n    self.visibleItems = [];\n    self.matchingItems = [];\n    self.searched = false;\n    self.filtered = false;\n    self.parse(self.list);\n  };\n\n  this.toJSON = function () {\n    var json = [];\n\n    for (var i = 0, il = self.items.length; i < il; i++) {\n      json.push(self.items[i].values());\n    }\n\n    return json;\n  };\n  /*\n   * Add object to list\n   */\n\n\n  this.add = function (values, callback) {\n    if (values.length === 0) {\n      return;\n    }\n\n    if (callback) {\n      addAsync(values.slice(0), callback);\n      return;\n    }\n\n    var added = [],\n        notCreate = false;\n\n    if (values[0] === undefined) {\n      values = [values];\n    }\n\n    for (var i = 0, il = values.length; i < il; i++) {\n      var item = null;\n      notCreate = self.items.length > self.page ? true : false;\n      item = new Item(values[i], undefined, notCreate);\n      self.items.push(item);\n      added.push(item);\n    }\n\n    self.update();\n    return added;\n  };\n\n  this.show = function (i, page) {\n    this.i = i;\n    this.page = page;\n    self.update();\n    return self;\n  };\n  /* Removes object from list.\n   * Loops through the list and removes objects where\n   * property \"valuename\" === value\n   */\n\n\n  this.remove = function (valueName, value, options) {\n    var found = 0;\n\n    for (var i = 0, il = self.items.length; i < il; i++) {\n      if (self.items[i].values()[valueName] == value) {\n        self.templater.remove(self.items[i], options);\n        self.items.splice(i, 1);\n        il--;\n        i--;\n        found++;\n      }\n    }\n\n    self.update();\n    return found;\n  };\n  /* Gets the objects in the list which\n   * property \"valueName\" === value\n   */\n\n\n  this.get = function (valueName, value) {\n    var matchedItems = [];\n\n    for (var i = 0, il = self.items.length; i < il; i++) {\n      var item = self.items[i];\n\n      if (item.values()[valueName] == value) {\n        matchedItems.push(item);\n      }\n    }\n\n    return matchedItems;\n  };\n  /*\n   * Get size of the list\n   */\n\n\n  this.size = function () {\n    return self.items.length;\n  };\n  /*\n   * Removes all items from the list\n   */\n\n\n  this.clear = function () {\n    self.templater.clear();\n    self.items = [];\n    return self;\n  };\n\n  this.on = function (event, callback) {\n    self.handlers[event].push(callback);\n    return self;\n  };\n\n  this.off = function (event, callback) {\n    var e = self.handlers[event];\n    var index = indexOf(e, callback);\n\n    if (index > -1) {\n      e.splice(index, 1);\n    }\n\n    return self;\n  };\n\n  this.trigger = function (event) {\n    var i = self.handlers[event].length;\n\n    while (i--) {\n      self.handlers[event][i](self);\n    }\n\n    return self;\n  };\n\n  this.reset = {\n    filter: function filter() {\n      var is = self.items,\n          il = is.length;\n\n      while (il--) {\n        is[il].filtered = false;\n      }\n\n      return self;\n    },\n    search: function search() {\n      var is = self.items,\n          il = is.length;\n\n      while (il--) {\n        is[il].found = false;\n      }\n\n      return self;\n    }\n  };\n\n  this.update = function () {\n    var is = self.items,\n        il = is.length;\n    self.visibleItems = [];\n    self.matchingItems = [];\n    self.templater.clear();\n\n    for (var i = 0; i < il; i++) {\n      if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n        is[i].show();\n        self.visibleItems.push(is[i]);\n        self.matchingItems.push(is[i]);\n      } else if (is[i].matching()) {\n        self.matchingItems.push(is[i]);\n        is[i].hide();\n      } else {\n        is[i].hide();\n      }\n    }\n\n    self.trigger('updated');\n    return self;\n  };\n\n  init.start();\n};\n\n/***/ }),\n\n/***/ \"./src/item.js\":\n/*!*********************!*\\\n  !*** ./src/item.js ***!\n  \\*********************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (list) {\n  return function (initValues, element, notCreate) {\n    var item = this;\n    this._values = {};\n    this.found = false; // Show if list.searched == true and this.found == true\n\n    this.filtered = false; // Show if list.filtered == true and this.filtered == true\n\n    var init = function init(initValues, element, notCreate) {\n      if (element === undefined) {\n        if (notCreate) {\n          item.values(initValues, notCreate);\n        } else {\n          item.values(initValues);\n        }\n      } else {\n        item.elm = element;\n        var values = list.templater.get(item, initValues);\n        item.values(values);\n      }\n    };\n\n    this.values = function (newValues, notCreate) {\n      if (newValues !== undefined) {\n        for (var name in newValues) {\n          item._values[name] = newValues[name];\n        }\n\n        if (notCreate !== true) {\n          list.templater.set(item, item.values());\n        }\n      } else {\n        return item._values;\n      }\n    };\n\n    this.show = function () {\n      list.templater.show(item);\n    };\n\n    this.hide = function () {\n      list.templater.hide(item);\n    };\n\n    this.matching = function () {\n      return list.filtered && list.searched && item.found && item.filtered || list.filtered && !list.searched && item.filtered || !list.filtered && list.searched && item.found || !list.filtered && !list.searched;\n    };\n\n    this.visible = function () {\n      return item.elm && item.elm.parentNode == list.list ? true : false;\n    };\n\n    init(initValues, element, notCreate);\n  };\n};\n\n/***/ }),\n\n/***/ \"./src/pagination.js\":\n/*!***************************!*\\\n  !*** ./src/pagination.js ***!\n  \\***************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module, __webpack_require__ */\n/*! CommonJS bailout: module.exports is used directly at 5:0-14 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar classes = __webpack_require__(/*! ./utils/classes */ \"./src/utils/classes.js\"),\n    events = __webpack_require__(/*! ./utils/events */ \"./src/utils/events.js\"),\n    List = __webpack_require__(/*! ./index */ \"./src/index.js\");\n\nmodule.exports = function (list) {\n  var isHidden = false;\n\n  var refresh = function refresh(pagingList, options) {\n    if (list.page < 1) {\n      list.listContainer.style.display = 'none';\n      isHidden = true;\n      return;\n    } else if (isHidden) {\n      list.listContainer.style.display = 'block';\n    }\n\n    var item,\n        l = list.matchingItems.length,\n        index = list.i,\n        page = list.page,\n        pages = Math.ceil(l / page),\n        currentPage = Math.ceil(index / page),\n        innerWindow = options.innerWindow || 2,\n        left = options.left || options.outerWindow || 0,\n        right = options.right || options.outerWindow || 0;\n    right = pages - right;\n    pagingList.clear();\n\n    for (var i = 1; i <= pages; i++) {\n      var className = currentPage === i ? 'active' : ''; //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n      if (is.number(i, left, right, currentPage, innerWindow)) {\n        item = pagingList.add({\n          page: i,\n          dotted: false\n        })[0];\n\n        if (className) {\n          classes(item.elm).add(className);\n        }\n\n        item.elm.firstChild.setAttribute('data-i', i);\n        item.elm.firstChild.setAttribute('data-page', page);\n      } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n        item = pagingList.add({\n          page: '...',\n          dotted: true\n        })[0];\n        classes(item.elm).add('disabled');\n      }\n    }\n  };\n\n  var is = {\n    number: function number(i, left, right, currentPage, innerWindow) {\n      return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow);\n    },\n    left: function left(i, _left) {\n      return i <= _left;\n    },\n    right: function right(i, _right) {\n      return i > _right;\n    },\n    innerWindow: function innerWindow(i, currentPage, _innerWindow) {\n      return i >= currentPage - _innerWindow && i <= currentPage + _innerWindow;\n    },\n    dotted: function dotted(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n      return this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem);\n    },\n    dottedLeft: function dottedLeft(pagingList, i, left, right, currentPage, innerWindow) {\n      return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right);\n    },\n    dottedRight: function dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n      if (pagingList.items[currentPageItem - 1].values().dotted) {\n        return false;\n      } else {\n        return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right);\n      }\n    }\n  };\n  return function (options) {\n    var pagingList = new List(list.listContainer.id, {\n      listClass: options.paginationClass || 'pagination',\n      item: options.item || \"<li><a class='page' href='#'></a></li>\",\n      valueNames: ['page', 'dotted'],\n      searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n      sortClass: 'pagination-sort-that-is-not-supposed-to-exist'\n    });\n    events.bind(pagingList.listContainer, 'click', function (e) {\n      var target = e.target || e.srcElement,\n          page = list.utils.getAttribute(target, 'data-page'),\n          i = list.utils.getAttribute(target, 'data-i');\n\n      if (i) {\n        list.show((i - 1) * page + 1, page);\n      }\n    });\n    list.on('updated', function () {\n      refresh(pagingList, options);\n    });\n    refresh(pagingList, options);\n  };\n};\n\n/***/ }),\n\n/***/ \"./src/parse.js\":\n/*!**********************!*\\\n  !*** ./src/parse.js ***!\n  \\**********************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module, __webpack_require__ */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nmodule.exports = function (list) {\n  var Item = __webpack_require__(/*! ./item */ \"./src/item.js\")(list);\n\n  var getChildren = function getChildren(parent) {\n    var nodes = parent.childNodes,\n        items = [];\n\n    for (var i = 0, il = nodes.length; i < il; i++) {\n      // Only textnodes have a data attribute\n      if (nodes[i].data === undefined) {\n        items.push(nodes[i]);\n      }\n    }\n\n    return items;\n  };\n\n  var parse = function parse(itemElements, valueNames) {\n    for (var i = 0, il = itemElements.length; i < il; i++) {\n      list.items.push(new Item(valueNames, itemElements[i]));\n    }\n  };\n\n  var parseAsync = function parseAsync(itemElements, valueNames) {\n    var itemsToIndex = itemElements.splice(0, 50); // TODO: If < 100 items, what happens in IE etc?\n\n    parse(itemsToIndex, valueNames);\n\n    if (itemElements.length > 0) {\n      setTimeout(function () {\n        parseAsync(itemElements, valueNames);\n      }, 1);\n    } else {\n      list.update();\n      list.trigger('parseComplete');\n    }\n  };\n\n  list.handlers.parseComplete = list.handlers.parseComplete || [];\n  return function () {\n    var itemsToIndex = getChildren(list.list),\n        valueNames = list.valueNames;\n\n    if (list.indexAsync) {\n      parseAsync(itemsToIndex, valueNames);\n    } else {\n      parse(itemsToIndex, valueNames);\n    }\n  };\n};\n\n/***/ }),\n\n/***/ \"./src/search.js\":\n/*!***********************!*\\\n  !*** ./src/search.js ***!\n  \\***********************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (_list) {\n  var item, text, columns, searchString, customSearch;\n  var prepare = {\n    resetList: function resetList() {\n      _list.i = 1;\n\n      _list.templater.clear();\n\n      customSearch = undefined;\n    },\n    setOptions: function setOptions(args) {\n      if (args.length == 2 && args[1] instanceof Array) {\n        columns = args[1];\n      } else if (args.length == 2 && typeof args[1] == 'function') {\n        columns = undefined;\n        customSearch = args[1];\n      } else if (args.length == 3) {\n        columns = args[1];\n        customSearch = args[2];\n      } else {\n        columns = undefined;\n      }\n    },\n    setColumns: function setColumns() {\n      if (_list.items.length === 0) return;\n\n      if (columns === undefined) {\n        columns = _list.searchColumns === undefined ? prepare.toArray(_list.items[0].values()) : _list.searchColumns;\n      }\n    },\n    setSearchString: function setSearchString(s) {\n      s = _list.utils.toString(s).toLowerCase();\n      s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&'); // Escape regular expression characters\n\n      searchString = s;\n    },\n    toArray: function toArray(values) {\n      var tmpColumn = [];\n\n      for (var name in values) {\n        tmpColumn.push(name);\n      }\n\n      return tmpColumn;\n    }\n  };\n  var search = {\n    list: function list() {\n      // Extract quoted phrases \"word1 word2\" from original searchString\n      // searchString is converted to lowercase by List.js\n      var words = [],\n          phrase,\n          ss = searchString;\n\n      while ((phrase = ss.match(/\"([^\"]+)\"/)) !== null) {\n        words.push(phrase[1]);\n        ss = ss.substring(0, phrase.index) + ss.substring(phrase.index + phrase[0].length);\n      } // Get remaining space-separated words (if any)\n\n\n      ss = ss.trim();\n      if (ss.length) words = words.concat(ss.split(/\\s+/));\n\n      for (var k = 0, kl = _list.items.length; k < kl; k++) {\n        var item = _list.items[k];\n        item.found = false;\n        if (!words.length) continue;\n\n        for (var i = 0, il = words.length; i < il; i++) {\n          var word_found = false;\n\n          for (var j = 0, jl = columns.length; j < jl; j++) {\n            var values = item.values(),\n                column = columns[j];\n\n            if (values.hasOwnProperty(column) && values[column] !== undefined && values[column] !== null) {\n              var text = typeof values[column] !== 'string' ? values[column].toString() : values[column];\n\n              if (text.toLowerCase().indexOf(words[i]) !== -1) {\n                // word found, so no need to check it against any other columns\n                word_found = true;\n                break;\n              }\n            }\n          } // this word not found? no need to check any other words, the item cannot match\n\n\n          if (!word_found) break;\n        }\n\n        item.found = word_found;\n      }\n    },\n    // Removed search.item() and search.values()\n    reset: function reset() {\n      _list.reset.search();\n\n      _list.searched = false;\n    }\n  };\n\n  var searchMethod = function searchMethod(str) {\n    _list.trigger('searchStart');\n\n    prepare.resetList();\n    prepare.setSearchString(str);\n    prepare.setOptions(arguments); // str, cols|searchFunction, searchFunction\n\n    prepare.setColumns();\n\n    if (searchString === '') {\n      search.reset();\n    } else {\n      _list.searched = true;\n\n      if (customSearch) {\n        customSearch(searchString, columns);\n      } else {\n        search.list();\n      }\n    }\n\n    _list.update();\n\n    _list.trigger('searchComplete');\n\n    return _list.visibleItems;\n  };\n\n  _list.handlers.searchStart = _list.handlers.searchStart || [];\n  _list.handlers.searchComplete = _list.handlers.searchComplete || [];\n\n  _list.utils.events.bind(_list.utils.getByClass(_list.listContainer, _list.searchClass), 'keyup', _list.utils.events.debounce(function (e) {\n    var target = e.target || e.srcElement,\n        // IE have srcElement\n    alreadyCleared = target.value === '' && !_list.searched;\n\n    if (!alreadyCleared) {\n      // If oninput already have resetted the list, do nothing\n      searchMethod(target.value);\n    }\n  }, _list.searchDelay)); // Used to detect click on HTML5 clear button\n\n\n  _list.utils.events.bind(_list.utils.getByClass(_list.listContainer, _list.searchClass), 'input', function (e) {\n    var target = e.target || e.srcElement;\n\n    if (target.value === '') {\n      searchMethod('');\n    }\n  });\n\n  return searchMethod;\n};\n\n/***/ }),\n\n/***/ \"./src/sort.js\":\n/*!*********************!*\\\n  !*** ./src/sort.js ***!\n  \\*********************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (list) {\n  var buttons = {\n    els: undefined,\n    clear: function clear() {\n      for (var i = 0, il = buttons.els.length; i < il; i++) {\n        list.utils.classes(buttons.els[i]).remove('asc');\n        list.utils.classes(buttons.els[i]).remove('desc');\n      }\n    },\n    getOrder: function getOrder(btn) {\n      var predefinedOrder = list.utils.getAttribute(btn, 'data-order');\n\n      if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n        return predefinedOrder;\n      } else if (list.utils.classes(btn).has('desc')) {\n        return 'asc';\n      } else if (list.utils.classes(btn).has('asc')) {\n        return 'desc';\n      } else {\n        return 'asc';\n      }\n    },\n    getInSensitive: function getInSensitive(btn, options) {\n      var insensitive = list.utils.getAttribute(btn, 'data-insensitive');\n\n      if (insensitive === 'false') {\n        options.insensitive = false;\n      } else {\n        options.insensitive = true;\n      }\n    },\n    setOrder: function setOrder(options) {\n      for (var i = 0, il = buttons.els.length; i < il; i++) {\n        var btn = buttons.els[i];\n\n        if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n          continue;\n        }\n\n        var predefinedOrder = list.utils.getAttribute(btn, 'data-order');\n\n        if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n          if (predefinedOrder == options.order) {\n            list.utils.classes(btn).add(options.order);\n          }\n        } else {\n          list.utils.classes(btn).add(options.order);\n        }\n      }\n    }\n  };\n\n  var sort = function sort() {\n    list.trigger('sortStart');\n    var options = {};\n    var target = arguments[0].currentTarget || arguments[0].srcElement || undefined;\n\n    if (target) {\n      options.valueName = list.utils.getAttribute(target, 'data-sort');\n      buttons.getInSensitive(target, options);\n      options.order = buttons.getOrder(target);\n    } else {\n      options = arguments[1] || options;\n      options.valueName = arguments[0];\n      options.order = options.order || 'asc';\n      options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive;\n    }\n\n    buttons.clear();\n    buttons.setOrder(options); // caseInsensitive\n    // alphabet\n\n    var customSortFunction = options.sortFunction || list.sortFunction || null,\n        multi = options.order === 'desc' ? -1 : 1,\n        sortFunction;\n\n    if (customSortFunction) {\n      sortFunction = function sortFunction(itemA, itemB) {\n        return customSortFunction(itemA, itemB, options) * multi;\n      };\n    } else {\n      sortFunction = function sortFunction(itemA, itemB) {\n        var sort = list.utils.naturalSort;\n        sort.alphabet = list.alphabet || options.alphabet || undefined;\n\n        if (!sort.alphabet && options.insensitive) {\n          sort = list.utils.naturalSort.caseInsensitive;\n        }\n\n        return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi;\n      };\n    }\n\n    list.items.sort(sortFunction);\n    list.update();\n    list.trigger('sortComplete');\n  }; // Add handlers\n\n\n  list.handlers.sortStart = list.handlers.sortStart || [];\n  list.handlers.sortComplete = list.handlers.sortComplete || [];\n  buttons.els = list.utils.getByClass(list.listContainer, list.sortClass);\n  list.utils.events.bind(buttons.els, 'click', sort);\n  list.on('searchStart', buttons.clear);\n  list.on('filterStart', buttons.clear);\n  return sort;\n};\n\n/***/ }),\n\n/***/ \"./src/templater.js\":\n/*!**************************!*\\\n  !*** ./src/templater.js ***!\n  \\**************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 216:0-14 */\n/***/ (function(module) {\n\nvar Templater = function Templater(list) {\n  var createItem,\n      templater = this;\n\n  var init = function init() {\n    var itemSource;\n\n    if (typeof list.item === 'function') {\n      createItem = function createItem(values) {\n        var item = list.item(values);\n        return getItemSource(item);\n      };\n\n      return;\n    }\n\n    if (typeof list.item === 'string') {\n      if (list.item.indexOf('<') === -1) {\n        itemSource = document.getElementById(list.item);\n      } else {\n        itemSource = getItemSource(list.item);\n      }\n    } else {\n      /* If item source does not exists, use the first item in list as\n      source for new items */\n      itemSource = getFirstListItem();\n    }\n\n    if (!itemSource) {\n      throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\");\n    }\n\n    itemSource = createCleanTemplateItem(itemSource, list.valueNames);\n\n    createItem = function createItem() {\n      return itemSource.cloneNode(true);\n    };\n  };\n\n  var createCleanTemplateItem = function createCleanTemplateItem(templateNode, valueNames) {\n    var el = templateNode.cloneNode(true);\n    el.removeAttribute('id');\n\n    for (var i = 0, il = valueNames.length; i < il; i++) {\n      var elm = undefined,\n          valueName = valueNames[i];\n\n      if (valueName.data) {\n        for (var j = 0, jl = valueName.data.length; j < jl; j++) {\n          el.setAttribute('data-' + valueName.data[j], '');\n        }\n      } else if (valueName.attr && valueName.name) {\n        elm = list.utils.getByClass(el, valueName.name, true);\n\n        if (elm) {\n          elm.setAttribute(valueName.attr, '');\n        }\n      } else {\n        elm = list.utils.getByClass(el, valueName, true);\n\n        if (elm) {\n          elm.innerHTML = '';\n        }\n      }\n    }\n\n    return el;\n  };\n\n  var getFirstListItem = function getFirstListItem() {\n    var nodes = list.list.childNodes;\n\n    for (var i = 0, il = nodes.length; i < il; i++) {\n      // Only textnodes have a data attribute\n      if (nodes[i].data === undefined) {\n        return nodes[i].cloneNode(true);\n      }\n    }\n\n    return undefined;\n  };\n\n  var getItemSource = function getItemSource(itemHTML) {\n    if (typeof itemHTML !== 'string') return undefined;\n\n    if (/<tr[\\s>]/g.exec(itemHTML)) {\n      var tbody = document.createElement('tbody');\n      tbody.innerHTML = itemHTML;\n      return tbody.firstElementChild;\n    } else if (itemHTML.indexOf('<') !== -1) {\n      var div = document.createElement('div');\n      div.innerHTML = itemHTML;\n      return div.firstElementChild;\n    }\n\n    return undefined;\n  };\n\n  var getValueName = function getValueName(name) {\n    for (var i = 0, il = list.valueNames.length; i < il; i++) {\n      var valueName = list.valueNames[i];\n\n      if (valueName.data) {\n        var data = valueName.data;\n\n        for (var j = 0, jl = data.length; j < jl; j++) {\n          if (data[j] === name) {\n            return {\n              data: name\n            };\n          }\n        }\n      } else if (valueName.attr && valueName.name && valueName.name == name) {\n        return valueName;\n      } else if (valueName === name) {\n        return name;\n      }\n    }\n  };\n\n  var setValue = function setValue(item, name, value) {\n    var elm = undefined,\n        valueName = getValueName(name);\n    if (!valueName) return;\n\n    if (valueName.data) {\n      item.elm.setAttribute('data-' + valueName.data, value);\n    } else if (valueName.attr && valueName.name) {\n      elm = list.utils.getByClass(item.elm, valueName.name, true);\n\n      if (elm) {\n        elm.setAttribute(valueName.attr, value);\n      }\n    } else {\n      elm = list.utils.getByClass(item.elm, valueName, true);\n\n      if (elm) {\n        elm.innerHTML = value;\n      }\n    }\n  };\n\n  this.get = function (item, valueNames) {\n    templater.create(item);\n    var values = {};\n\n    for (var i = 0, il = valueNames.length; i < il; i++) {\n      var elm = undefined,\n          valueName = valueNames[i];\n\n      if (valueName.data) {\n        for (var j = 0, jl = valueName.data.length; j < jl; j++) {\n          values[valueName.data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueName.data[j]);\n        }\n      } else if (valueName.attr && valueName.name) {\n        elm = list.utils.getByClass(item.elm, valueName.name, true);\n        values[valueName.name] = elm ? list.utils.getAttribute(elm, valueName.attr) : '';\n      } else {\n        elm = list.utils.getByClass(item.elm, valueName, true);\n        values[valueName] = elm ? elm.innerHTML : '';\n      }\n    }\n\n    return values;\n  };\n\n  this.set = function (item, values) {\n    if (!templater.create(item)) {\n      for (var v in values) {\n        if (values.hasOwnProperty(v)) {\n          setValue(item, v, values[v]);\n        }\n      }\n    }\n  };\n\n  this.create = function (item) {\n    if (item.elm !== undefined) {\n      return false;\n    }\n\n    item.elm = createItem(item.values());\n    templater.set(item, item.values());\n    return true;\n  };\n\n  this.remove = function (item) {\n    if (item.elm.parentNode === list.list) {\n      list.list.removeChild(item.elm);\n    }\n  };\n\n  this.show = function (item) {\n    templater.create(item);\n    list.list.appendChild(item.elm);\n  };\n\n  this.hide = function (item) {\n    if (item.elm !== undefined && item.elm.parentNode === list.list) {\n      list.list.removeChild(item.elm);\n    }\n  };\n\n  this.clear = function () {\n    /* .innerHTML = ''; fucks up IE */\n    if (list.list.hasChildNodes()) {\n      while (list.list.childNodes.length >= 1) {\n        list.list.removeChild(list.list.firstChild);\n      }\n    }\n  };\n\n  init();\n};\n\nmodule.exports = function (list) {\n  return new Templater(list);\n};\n\n/***/ }),\n\n/***/ \"./src/utils/classes.js\":\n/*!******************************!*\\\n  !*** ./src/utils/classes.js ***!\n  \\******************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module, __webpack_require__ */\n/*! CommonJS bailout: module.exports is used directly at 24:0-14 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/**\n * Module dependencies.\n */\nvar index = __webpack_require__(/*! ./index-of */ \"./src/utils/index-of.js\");\n/**\n * Whitespace regexp.\n */\n\n\nvar re = /\\s+/;\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString;\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n  return new ClassList(el);\n};\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\n\nfunction ClassList(el) {\n  if (!el || !el.nodeType) {\n    throw new Error('A DOM element reference is required');\n  }\n\n  this.el = el;\n  this.list = el.classList;\n}\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\n\nClassList.prototype.add = function (name) {\n  // classList\n  if (this.list) {\n    this.list.add(name);\n    return this;\n  } // fallback\n\n\n  var arr = this.array();\n  var i = index(arr, name);\n  if (!~i) arr.push(name);\n  this.el.className = arr.join(' ');\n  return this;\n};\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\n\nClassList.prototype.remove = function (name) {\n  // classList\n  if (this.list) {\n    this.list.remove(name);\n    return this;\n  } // fallback\n\n\n  var arr = this.array();\n  var i = index(arr, name);\n  if (~i) arr.splice(i, 1);\n  this.el.className = arr.join(' ');\n  return this;\n};\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\n\nClassList.prototype.toggle = function (name, force) {\n  // classList\n  if (this.list) {\n    if ('undefined' !== typeof force) {\n      if (force !== this.list.toggle(name, force)) {\n        this.list.toggle(name); // toggle again to correct\n      }\n    } else {\n      this.list.toggle(name);\n    }\n\n    return this;\n  } // fallback\n\n\n  if ('undefined' !== typeof force) {\n    if (!force) {\n      this.remove(name);\n    } else {\n      this.add(name);\n    }\n  } else {\n    if (this.has(name)) {\n      this.remove(name);\n    } else {\n      this.add(name);\n    }\n  }\n\n  return this;\n};\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\n\nClassList.prototype.array = function () {\n  var className = this.el.getAttribute('class') || '';\n  var str = className.replace(/^\\s+|\\s+$/g, '');\n  var arr = str.split(re);\n  if ('' === arr[0]) arr.shift();\n  return arr;\n};\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n  return this.list ? this.list.contains(name) : !!~index(this.array(), name);\n};\n\n/***/ }),\n\n/***/ \"./src/utils/events.js\":\n/*!*****************************!*\\\n  !*** ./src/utils/events.js ***!\n  \\*****************************/\n/*! default exports */\n/*! export bind [provided] [no usage info] [missing usage info prevents renaming] */\n/*! export debounce [provided] [no usage info] [missing usage info prevents renaming] */\n/*! export unbind [provided] [no usage info] [missing usage info prevents renaming] */\n/*! other exports [not provided] [no usage info] */\n/*! runtime requirements: __webpack_exports__, __webpack_require__ */\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\nvar bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n    unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n    prefix = bind !== 'addEventListener' ? 'on' : '',\n    toArray = __webpack_require__(/*! ./to-array */ \"./src/utils/to-array.js\");\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\n\nexports.bind = function (el, type, fn, capture) {\n  el = toArray(el);\n\n  for (var i = 0, il = el.length; i < il; i++) {\n    el[i][bind](prefix + type, fn, capture || false);\n  }\n};\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\n\nexports.unbind = function (el, type, fn, capture) {\n  el = toArray(el);\n\n  for (var i = 0, il = el.length; i < il; i++) {\n    el[i][unbind](prefix + type, fn, capture || false);\n  }\n};\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * `wait` milliseconds. If `immediate` is true, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @param {Function} fn\n * @param {Integer} wait\n * @param {Boolean} immediate\n * @api public\n */\n\n\nexports.debounce = function (fn, wait, immediate) {\n  var timeout;\n  return wait ? function () {\n    var context = this,\n        args = arguments;\n\n    var later = function later() {\n      timeout = null;\n      if (!immediate) fn.apply(context, args);\n    };\n\n    var callNow = immediate && !timeout;\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n    if (callNow) fn.apply(context, args);\n  } : fn;\n};\n\n/***/ }),\n\n/***/ \"./src/utils/extend.js\":\n/*!*****************************!*\\\n  !*** ./src/utils/extend.js ***!\n  \\*****************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 4:0-14 */\n/***/ (function(module) {\n\n/*\n * Source: https://github.com/segmentio/extend\n */\nmodule.exports = function extend(object) {\n  // Takes an unlimited number of extenders.\n  var args = Array.prototype.slice.call(arguments, 1); // For each extender, copy their properties on our object.\n\n  for (var i = 0, source; source = args[i]; i++) {\n    if (!source) continue;\n\n    for (var property in source) {\n      object[property] = source[property];\n    }\n  }\n\n  return object;\n};\n\n/***/ }),\n\n/***/ \"./src/utils/fuzzy.js\":\n/*!****************************!*\\\n  !*** ./src/utils/fuzzy.js ***!\n  \\****************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (text, pattern, options) {\n  // Aproximately where in the text is the pattern expected to be found?\n  var Match_Location = options.location || 0; //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n\n  var Match_Distance = options.distance || 100; // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n\n  var Match_Threshold = options.threshold || 0.4;\n  if (pattern === text) return true; // Exact match\n\n  if (pattern.length > 32) return false; // This algorithm cannot be used\n  // Set starting location at beginning text and initialise the alphabet.\n\n  var loc = Match_Location,\n      s = function () {\n    var q = {},\n        i;\n\n    for (i = 0; i < pattern.length; i++) {\n      q[pattern.charAt(i)] = 0;\n    }\n\n    for (i = 0; i < pattern.length; i++) {\n      q[pattern.charAt(i)] |= 1 << pattern.length - i - 1;\n    }\n\n    return q;\n  }(); // Compute and return the score for a match with e errors and x location.\n  // Accesses loc and pattern through being a closure.\n\n\n  function match_bitapScore_(e, x) {\n    var accuracy = e / pattern.length,\n        proximity = Math.abs(loc - x);\n\n    if (!Match_Distance) {\n      // Dodge divide by zero error.\n      return proximity ? 1.0 : accuracy;\n    }\n\n    return accuracy + proximity / Match_Distance;\n  }\n\n  var score_threshold = Match_Threshold,\n      // Highest score beyond which we give up.\n  best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup)\n\n  if (best_loc != -1) {\n    score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); // What about in the other direction? (speedup)\n\n    best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n\n    if (best_loc != -1) {\n      score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n    }\n  } // Initialise the bit arrays.\n\n\n  var matchmask = 1 << pattern.length - 1;\n  best_loc = -1;\n  var bin_min, bin_mid;\n  var bin_max = pattern.length + text.length;\n  var last_rd;\n\n  for (var d = 0; d < pattern.length; d++) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from 'loc' we can stray at this\n    // error level.\n    bin_min = 0;\n    bin_mid = bin_max;\n\n    while (bin_min < bin_mid) {\n      if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n        bin_min = bin_mid;\n      } else {\n        bin_max = bin_mid;\n      }\n\n      bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n    } // Use the result from this iteration as the maximum for the next.\n\n\n    bin_max = bin_mid;\n    var start = Math.max(1, loc - bin_mid + 1);\n    var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n    var rd = Array(finish + 2);\n    rd[finish + 1] = (1 << d) - 1;\n\n    for (var j = finish; j >= start; j--) {\n      // The alphabet (s) is a sparse hash, so the following line generates\n      // warnings.\n      var charMatch = s[text.charAt(j - 1)];\n\n      if (d === 0) {\n        // First pass: exact match.\n        rd[j] = (rd[j + 1] << 1 | 1) & charMatch;\n      } else {\n        // Subsequent passes: fuzzy match.\n        rd[j] = (rd[j + 1] << 1 | 1) & charMatch | ((last_rd[j + 1] | last_rd[j]) << 1 | 1) | last_rd[j + 1];\n      }\n\n      if (rd[j] & matchmask) {\n        var score = match_bitapScore_(d, j - 1); // This match will almost certainly be better than any existing match.\n        // But check anyway.\n\n        if (score <= score_threshold) {\n          // Told you so.\n          score_threshold = score;\n          best_loc = j - 1;\n\n          if (best_loc > loc) {\n            // When passing loc, don't exceed our current distance from loc.\n            start = Math.max(1, 2 * loc - best_loc);\n          } else {\n            // Already passed loc, downhill from here on in.\n            break;\n          }\n        }\n      }\n    } // No hope for a (better) match at greater error levels.\n\n\n    if (match_bitapScore_(d + 1, loc) > score_threshold) {\n      break;\n    }\n\n    last_rd = rd;\n  }\n\n  return best_loc < 0 ? false : true;\n};\n\n/***/ }),\n\n/***/ \"./src/utils/get-attribute.js\":\n/*!************************************!*\\\n  !*** ./src/utils/get-attribute.js ***!\n  \\************************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 11:0-14 */\n/***/ (function(module) {\n\n/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\nmodule.exports = function (el, attr) {\n  var result = el.getAttribute && el.getAttribute(attr) || null;\n\n  if (!result) {\n    var attrs = el.attributes;\n    var length = attrs.length;\n\n    for (var i = 0; i < length; i++) {\n      if (attrs[i] !== undefined) {\n        if (attrs[i].nodeName === attr) {\n          result = attrs[i].nodeValue;\n        }\n      }\n    }\n  }\n\n  return result;\n};\n\n/***/ }),\n\n/***/ \"./src/utils/get-by-class.js\":\n/*!***********************************!*\\\n  !*** ./src/utils/get-by-class.js ***!\n  \\***********************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 53:0-14 */\n/***/ (function(module) {\n\n/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\nvar getElementsByClassName = function getElementsByClassName(container, className, single) {\n  if (single) {\n    return container.getElementsByClassName(className)[0];\n  } else {\n    return container.getElementsByClassName(className);\n  }\n};\n\nvar querySelector = function querySelector(container, className, single) {\n  className = '.' + className;\n\n  if (single) {\n    return container.querySelector(className);\n  } else {\n    return container.querySelectorAll(className);\n  }\n};\n\nvar polyfill = function polyfill(container, className, single) {\n  var classElements = [],\n      tag = '*';\n  var els = container.getElementsByTagName(tag);\n  var elsLen = els.length;\n  var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)');\n\n  for (var i = 0, j = 0; i < elsLen; i++) {\n    if (pattern.test(els[i].className)) {\n      if (single) {\n        return els[i];\n      } else {\n        classElements[j] = els[i];\n        j++;\n      }\n    }\n  }\n\n  return classElements;\n};\n\nmodule.exports = function () {\n  return function (container, className, single, options) {\n    options = options || {};\n\n    if (options.test && options.getElementsByClassName || !options.test && document.getElementsByClassName) {\n      return getElementsByClassName(container, className, single);\n    } else if (options.test && options.querySelector || !options.test && document.querySelector) {\n      return querySelector(container, className, single);\n    } else {\n      return polyfill(container, className, single);\n    }\n  };\n}();\n\n/***/ }),\n\n/***/ \"./src/utils/index-of.js\":\n/*!*******************************!*\\\n  !*** ./src/utils/index-of.js ***!\n  \\*******************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 3:0-14 */\n/***/ (function(module) {\n\nvar indexOf = [].indexOf;\n\nmodule.exports = function (arr, obj) {\n  if (indexOf) return arr.indexOf(obj);\n\n  for (var i = 0, il = arr.length; i < il; ++i) {\n    if (arr[i] === obj) return i;\n  }\n\n  return -1;\n};\n\n/***/ }),\n\n/***/ \"./src/utils/to-array.js\":\n/*!*******************************!*\\\n  !*** ./src/utils/to-array.js ***!\n  \\*******************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 11:0-14 */\n/***/ (function(module) {\n\n/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\nmodule.exports = function toArray(collection) {\n  if (typeof collection === 'undefined') return [];\n  if (collection === null) return [null];\n  if (collection === window) return [window];\n  if (typeof collection === 'string') return [collection];\n  if (isArray(collection)) return collection;\n  if (typeof collection.length != 'number') return [collection];\n  if (typeof collection === 'function' && collection instanceof Function) return [collection];\n  var arr = [];\n\n  for (var i = 0, il = collection.length; i < il; i++) {\n    if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n      arr.push(collection[i]);\n    }\n  }\n\n  if (!arr.length) return [];\n  return arr;\n};\n\nfunction isArray(arr) {\n  return Object.prototype.toString.call(arr) === '[object Array]';\n}\n\n/***/ }),\n\n/***/ \"./src/utils/to-string.js\":\n/*!********************************!*\\\n  !*** ./src/utils/to-string.js ***!\n  \\********************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 1:0-14 */\n/***/ (function(module) {\n\nmodule.exports = function (s) {\n  s = s === undefined ? '' : s;\n  s = s === null ? '' : s;\n  s = s.toString();\n  return s;\n};\n\n/***/ }),\n\n/***/ \"./node_modules/string-natural-compare/natural-compare.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/string-natural-compare/natural-compare.js ***!\n  \\****************************************************************/\n/*! unknown exports (runtime-defined) */\n/*! runtime requirements: module */\n/*! CommonJS bailout: module.exports is used directly at 124:0-14 */\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar alphabet;\nvar alphabetIndexMap;\nvar alphabetIndexMapLength = 0;\n\nfunction isNumberCode(code) {\n  return code >= 48 && code <= 57;\n}\n\nfunction naturalCompare(a, b) {\n  var lengthA = (a += '').length;\n  var lengthB = (b += '').length;\n  var aIndex = 0;\n  var bIndex = 0;\n\n  while (aIndex < lengthA && bIndex < lengthB) {\n    var charCodeA = a.charCodeAt(aIndex);\n    var charCodeB = b.charCodeAt(bIndex);\n\n    if (isNumberCode(charCodeA)) {\n      if (!isNumberCode(charCodeB)) {\n        return charCodeA - charCodeB;\n      }\n\n      var numStartA = aIndex;\n      var numStartB = bIndex;\n\n      while (charCodeA === 48 && ++numStartA < lengthA) {\n        charCodeA = a.charCodeAt(numStartA);\n      }\n      while (charCodeB === 48 && ++numStartB < lengthB) {\n        charCodeB = b.charCodeAt(numStartB);\n      }\n\n      var numEndA = numStartA;\n      var numEndB = numStartB;\n\n      while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {\n        ++numEndA;\n      }\n      while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {\n        ++numEndB;\n      }\n\n      var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length\n      if (difference) {\n        return difference;\n      }\n\n      while (numStartA < numEndA) {\n        difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);\n        if (difference) {\n          return difference;\n        }\n      }\n\n      aIndex = numEndA;\n      bIndex = numEndB;\n      continue;\n    }\n\n    if (charCodeA !== charCodeB) {\n      if (\n        charCodeA < alphabetIndexMapLength &&\n        charCodeB < alphabetIndexMapLength &&\n        alphabetIndexMap[charCodeA] !== -1 &&\n        alphabetIndexMap[charCodeB] !== -1\n      ) {\n        return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];\n      }\n\n      return charCodeA - charCodeB;\n    }\n\n    ++aIndex;\n    ++bIndex;\n  }\n\n  if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) {\n    return -1;\n  }\n\n  if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) {\n    return 1;\n  }\n\n  return lengthA - lengthB;\n}\n\nnaturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {\n  return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());\n};\n\nObject.defineProperties(naturalCompare, {\n  alphabet: {\n    get: function() {\n      return alphabet;\n    },\n\n    set: function(value) {\n      alphabet = value;\n      alphabetIndexMap = [];\n\n      var i = 0;\n\n      if (alphabet) {\n        for (; i < alphabet.length; i++) {\n          alphabetIndexMap[alphabet.charCodeAt(i)] = i;\n        }\n      }\n\n      alphabetIndexMapLength = alphabetIndexMap.length;\n\n      for (i = 0; i < alphabetIndexMapLength; i++) {\n        if (alphabetIndexMap[i] === undefined) {\n          alphabetIndexMap[i] = -1;\n        }\n      }\n    },\n  },\n});\n\nmodule.exports = naturalCompare;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(\"./src/index.js\");\n/******/ })()\n;\n//# sourceMappingURL=list.js.map"
  },
  {
    "path": "docs/.bundle/config",
    "content": "---\nBUNDLE_PATH: \"vendor/bundle\"\n"
  },
  {
    "path": "docs/.ruby-version",
    "content": "2.7.1"
  },
  {
    "path": "docs/CNAME",
    "content": "listjs.com"
  },
  {
    "path": "docs/Gemfile",
    "content": "source 'https://rubygems.org'\ngroup :jekyll_plugins do\n  gem 'github-pages'\nend\n"
  },
  {
    "path": "docs/README.md",
    "content": "# listjs.com\n"
  },
  {
    "path": "docs/_config.yml",
    "content": "title: List.js\nemail: jonny.stromberg@gmail.com\ndescription: > # this means to ignore newlines until \"baseurl:\"\n  Perfect library for adding search, sort, filters and flexibility to tables,\n  lists and various HTML elements. Built to be invisible and work on existing HTML.\nbaseurl: \"\" # the subpath of your site, e.g. /blog\nurl: \"https://listjs.com\" # the base hostname & protocol for your site\ntwitter_username: javve\ngithub_username:  javve\n\npermalink: pretty\nmarkdown: kramdown\nlivereload: true\n\nplugins:\n - jekyll-coffeescript\n - jekyll-redirect-from\n\ncollections:\n  examples:\n    output: true\n"
  },
  {
    "path": "docs/_data/pkg.json",
    "content": "{\n  \"name\": \"list.js\",\n  \"version\": \"2.3.1\",\n  \"description\": \"The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML\",\n  \"keywords\": [\n    \"list\",\n    \"search\",\n    \"sort\",\n    \"table\",\n    \"dom\",\n    \"html\",\n    \"ui\"\n  ],\n  \"author\": {\n    \"name\": \"Jonny Strömberg\",\n    \"email\": \"jonny.stromberg@gmail.com\",\n    \"url\": \"https://javve.com\"\n  },\n  \"homepage\": \"https://listjs.com\",\n  \"repository\": \"git://github.com/javve/list.js.git\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/javve/list.js/issues\"\n  },\n  \"dependencies\": {\n    \"string-natural-compare\": \"^2.0.2\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.12.7\",\n    \"@babel/preset-env\": \"^7.12.7\",\n    \"babel-loader\": \"^8.2.1\",\n    \"jest\": \"^26.6.3\",\n    \"jquery\": \"^3.5.1\",\n    \"prettier\": \"^2.2.0\",\n    \"webpack\": \"^5.6.0\",\n    \"webpack-cli\": \"^4.2.0\"\n  },\n  \"main\": \"src/index\",\n  \"engines\": {\n    \"node\": \"^6.0 || ^8.0 || ^10.0 || ^12.0 || >=14\"\n  },\n  \"scripts\": {\n    \"test\": \"npx jest\",\n    \"build\": \"npx webpack\",\n    \"watch\": \"npx webpack --watch\",\n    \"watch-test\": \"npx jest --watch\",\n    \"preversion\": \"npm test && npm run build && cp dist/list.min.js docs/assets/javascripts/list.min.js && cp dist/list.min.js.map docs/assets/javascripts/list.min.js.map && git add dist && git add docs/assets/javascripts\",\n    \"postversion\": \"git push --follow-tags origin master && cp package.json docs/_data/pkg.json && git add docs/_data/pkg.json && git commit -m \\\"pkg.json update\\\"\"\n  },\n  \"npmName\": \"list.js\",\n  \"npmFileMap\": [\n    {\n      \"basePath\": \"/dist/\",\n      \"files\": [\n        \"*.js\",\n        \"*.js.map\"\n      ]\n    }\n  ],\n  \"jest\": {\n    \"coverageDirectory\": \"./coverage/\",\n    \"collectCoverage\": true,\n    \"collectCoverageFrom\": [\n      \"src/*.js\",\n      \"src/utils/*.js\"\n    ],\n    \"testURL\": \"http://localhost/\"\n  }\n}\n"
  },
  {
    "path": "docs/_examples/add-get-remove.html",
    "content": "---\nlayout: default\nname: Add, get, remove\ntitle: Example to showcase the add, get and remove methods.\nurl: https://codepen.io/javve/pen/cLdfw\nslug: cLdfw\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/data-attributes-custom-attributes.html",
    "content": "---\nlayout: default\nurl: https://codepen.io/javve/pen/GZREaN\nslug: GZREaN\ntitle: Use data attributes and other custom attributes as keys\nname: Data attributes + custom\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/existing-list-add.html",
    "content": "---\nlayout: default\nurl: https://codepen.io/javve/pen/lAmCz\nslug: lAmCz\ntitle: Existing list and add items\nname: Existing list and add\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/existing-list.html",
    "content": "---\nlayout: default\nurl: https://codepen.io/javve/pen/zpuKF\nslug: zpuKF\ntitle: Basic example with existing list\nname: Existing list\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/fuzzy-search.html",
    "content": "---\nlayout: default\nname: Fuzzy search\ntitle: Example of how to use the fuzzy search plugin\nurl: https://codepen.io/javve/pen/isInl\nslug: isInl\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/new-list.html",
    "content": "---\nlayout: default\nurl: https://codepen.io/javve/pen/yroGq\nslug: yroGq\ntitle: Basic example with a new list\nname: New list\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/pagination.html",
    "content": "---\nlayout: default\nname: Pagination\ntitle: Example of how to use the pagination plugin\nurl: https://codepen.io/javve/pen/bBfgD\nslug: bBfgD\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_examples/table.html",
    "content": "---\nlayout: default\nurl: https://codepen.io/javve/pen/oEezp\nslug: oEezp\ntitle: Example of how to use a table with List.js\nname: Table\n---\n\n{% include codepen.html %}\n"
  },
  {
    "path": "docs/_includes/author.html",
    "content": "<div class=\"misc\">\n\n  <div class=\"misc-author\">\n    <img src=\"http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80\" id=\"javve-pic\" class=\"misc-author-pic\" />\n    <h4>Hi! I'm Jonny and the author of List.js.</h4>\n    <p>\n      I hope you like the lib. I’ve put a lot of hours into it!\n      Feel free to follow me on Twitter and GitHub for news and donate a coffee for good karma ;)\n    </p>\n    <iframe src=\"https://ghbtns.com/github-btn.html?user=javve&type=follow\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"0\" width=\"110px\" height=\"20px\"></iframe>\n    <a href=\"https://twitter.com/javve\" class=\"twitter-follow-button\" data-show-count=\"false\">Follow @javve</a>\n\n    <form class=\"donate-form\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\" target=\"_top\">\n      <input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">\n      <input type=\"hidden\" name=\"hosted_button_id\" value=\"V2SDE9QNU6KMA\">\n      <button type=\"submit\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" class=\"donate\">\n        <span onmouseover=\"$('#javve-pic').attr('src', '/assets/images/graphics/javve-coffee2.jpg');\" onmouseout=\"$('#javve-pic').attr('src', '/assets/images/graphics/javve.jpg');\">Donate a cup of coffee</span>\n      </button>\n      <img class=\"donate-pixel\" alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">\n    </form>\n  </div>\n</div>\n"
  },
  {
    "path": "docs/_includes/carbon.html",
    "content": "<script async type=\"text/javascript\" src=\"//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=listjscom\" id=\"_carbonads_js\"></script>\n"
  },
  {
    "path": "docs/_includes/codepen.html",
    "content": "<h2>{{ page.name }}</h2>\n<p>{{ page.title }}</p>\n\n\n<p class=\"codepen\" data-height=\"700\" data-theme-id=\"light\" data-default-tab=\"result\" data-user=\"javve\" data-slug-hash=\"{{ page.slug }}\"\nstyle=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\">\n  <span>See the Pen <a href=\"{{ page.url }}\">{{ page.url }}</a> by Jonny Strömberg (<a href=\"https://codepen.io/javve\">@javve</a>)\n  on <a href=\"https://codepen.io\">CodePen</a>.</span>\n</p>\n<script async src=\"https://static.codepen.io/assets/embed/ei.js\"></script>"
  },
  {
    "path": "docs/_includes/examples/annotated-example.html",
    "content": "<div class=\"annotated-examples\">\n<h2>Basic examples</h2>\n<p>\n  Here is an example of a list with List.js applied. List.js can be used in\n  three different ways. It can be on existing HTML, it can create it's own\n  HTML or a combination of both methods.\n</p>\n<div class=\"annotated-list\" id=\"users\">\n  <input class=\"search\" placeholder=\"Search\" />\n  <button class=\"sort\" data-sort=\"name\">Sort by name</button>\n  <button class=\"sort\" data-sort=\"born\">Sort by born</button>\n  <div class=\"list\">\n    <div>\n      <h3 class=\"name\">Jonny Strömberg</h3>\n      <p class=\"born\">1990</p>\n    </div>\n    <div>\n      <h3 class=\"name\">Jonas Arnklint</h3>\n      <p class=\"born\">1985</p>\n    </div>\n    <div>\n      <h3 class=\"name\">Martina Elm</h3>\n      <p class=\"born\">1986</p>\n    </div>\n    <div>\n      <h3 class=\"name\">Gustaf Lindqvist</h3>\n      <p class=\"born\">1983</p>\n    </div>\n  </div>\n</div>\n\n<h3>Apply List.js on existing HTML</h3>\n<div class=\"columns\">\n  <div class=\"column\">\n<pre><code id=\"existing-html\">&lt;div id=\"users\">\n\n&lt;!-- class=\"search\" automagically makes an input a search field. -->\n  &lt;input class=\"search\" placeholder=\"Search\" />\n&lt;!-- class=\"sort\" automagically makes an element a sort buttons. The date-sort value decides what to sort by. -->\n  &lt;button class=\"sort\" data-sort=\"name\">\n    Sort\n  &lt;/button>\n\n&lt;!-- Child elements of container with class=\"list\" becomes list items -->\n  &lt;ul class=\"list\">\n    &lt;li>\n&lt;!-- The innerHTML of children with class=\"name\" becomes this items \"name\" value -->\n      &lt;h3 class=\"name\">Jonny Stromberg&lt;/h3>\n      &lt;p class=\"born\">1986&lt;/p>\n    &lt;/li>\n    &lt;li>\n      &lt;h3 class=\"name\">Jonas Arnklint&lt;/h3>\n      &lt;p class=\"born\">1985&lt;/p>\n    &lt;/li>\n    &lt;li>\n      &lt;h3 class=\"name\">Martina Elm&lt;/h3>\n      &lt;p class=\"born\">1986&lt;/p>\n    &lt;/li>\n    &lt;li>\n      &lt;h3 class=\"name\">Gustaf Lindqvist&lt;/h3>\n      &lt;p class=\"born\">1983&lt;/p>\n    &lt;/li>\n  &lt;/ul>\n\n&lt;/div></code></pre>\n  </div>\n  <div class=\"column\">\n<pre><code id=\"existing-js\">var options = {\n  valueNames: [ 'name', 'born' ]\n};\n\nvar userList = new List('users', options);</code></pre>\n  </div>\n</div>\n\n<h3>Apply List.js on existing HTML and then add items</h3>\n<div class=\"columns\">\n  <div class=\"column\">\n<pre><code id=\"add-html\">&lt;div id=\"users\">\n\n  &lt;input class=\"search\" placeholder=\"Search\" />\n  &lt;button class=\"sort\" data-sort=\"name\">\n    Sort\n  &lt;/button>\n\n  &lt;ul class=\"list\">\n&lt;!-- This, the first element in the list, will be used as template for new items. -->\n    &lt;li>\n      &lt;h3 class=\"name\">Jonny Stromberg&lt;/h3>\n      &lt;p class=\"born\">1986&lt;/p>\n    &lt;/li>\n  &lt;/ul>\n\n&lt;/div>\n</code></pre>\n  </div>\n  <div class=\"column\">\n<pre><code id=\"add-js\">var options = {\n  valueNames: [ 'name', 'born' ]\n};\n\n// These items will be added to the list on initialization.\nvar values = [\n  {\n    name: 'Jonas Arnklint',\n    born: 1985\n  },\n  {\n    name: 'Martina Elm',\n    born: 1986\n  }\n];\n\nvar userList = new List('users', options, values);\n\n// It's possible to add items after list been initiated\nuserList.add({\n  name: 'Gustaf Lindqvist',\n  born: 1983\n});</code></pre>\n  </div>\n</div>\n\n\n\n<h3>Make List.js create a list from scratch</h3>\n<div class=\"columns\">\n  <div class=\"column\">\n<pre><code id=\"new-html\">&lt;div id=\"users\">\n\n  &lt;input class=\"search\" placeholder=\"Search\" />\n  &lt;button class=\"sort\" data-sort=\"name\">\n    Sort\n  &lt;/button>\n\n  &lt;ul class=\"list\">&lt;/ul>\n\n&lt;/div></code></pre>\n  </div>\n  <div class=\"column\">\n<pre><code id=\"new-js\" class=\"javascript\">var options = {\n  valueNames: [ 'name', 'born' ],\n  // Since there are no elements in the list, this will be used as template.\n  item: '&lt;li>&lt;h3 class=\"name\">&lt;/h3>&lt;p class=\"born\">&lt;/p>&lt;/li>'\n};\n\nvar values = [\n  {\n    name: 'Jonny Strömberg',\n    born: 1986\n  },\n  {\n    name: 'Jonas Arnklint',\n    born: 1985\n  },\n  {\n    name: 'Martina Elm',\n    born: 1986\n  }\n];\n\nvar userList = new List('users', options, values);\n\nuserList.add({\n  name: 'Gustaf Lindqvist',\n  born: 1983\n});\n</code></pre>\n  </div>\n</div>\n</div>\n"
  },
  {
    "path": "docs/_includes/javascripts/vendor/bootstrap/tab.js",
    "content": "/* ========================================================================\n * Bootstrap: tab.js v3.0.0\n * http://twbs.github.com/bootstrap/javascript.html#tabs\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // TAB CLASS DEFINITION\n  // ====================\n\n  var Tab = function (element) {\n    this.element = $(element)\n  }\n\n  Tab.prototype.show = function () {\n    var $this    = this.element\n    var $ul      = $this.closest('ul:not(.dropdown-menu)')\n    var selector = $this.data('target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\n    }\n\n    if ($this.parent('li').hasClass('active')) return\n\n    var previous = $ul.find('.active:last a')[0]\n    var e        = $.Event('show.bs.tab', {\n      relatedTarget: previous\n    })\n\n    $this.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    var $target = $(selector)\n\n    this.activate($this.parent('li'), $ul)\n    this.activate($target, $target.parent(), function () {\n      $this.trigger({\n        type: 'shown.bs.tab'\n      , relatedTarget: previous\n      })\n    })\n  }\n\n  Tab.prototype.activate = function (element, container, callback) {\n    var $active    = container.find('> .active')\n    var transition = callback\n      && $.support.transition\n      && $active.hasClass('fade')\n\n    function next() {\n      $active\n        .removeClass('active')\n        .find('> .dropdown-menu > .active')\n        .removeClass('active')\n\n      element.addClass('active')\n\n      if (transition) {\n        element[0].offsetWidth // reflow for transition\n        element.addClass('in')\n      } else {\n        element.removeClass('fade')\n      }\n\n      if (element.parent('.dropdown-menu')) {\n        element.closest('li.dropdown').addClass('active')\n      }\n\n      callback && callback()\n    }\n\n    transition ?\n      $active\n        .one($.support.transition.end, next)\n        .emulateTransitionEnd(150) :\n      next()\n\n    $active.removeClass('in')\n  }\n\n\n  // TAB PLUGIN DEFINITION\n  // =====================\n\n  var old = $.fn.tab\n\n  $.fn.tab = function ( option ) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.tab')\n\n      if (!data) $this.data('bs.tab', (data = new Tab(this)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.tab.Constructor = Tab\n\n\n  // TAB NO CONFLICT\n  // ===============\n\n  $.fn.tab.noConflict = function () {\n    $.fn.tab = old\n    return this\n  }\n\n\n  // TAB DATA-API\n  // ============\n\n  $(document).on('click.bs.tab.data-api', '[data-toggle=\"tab\"], [data-toggle=\"pill\"]', function (e) {\n    e.preventDefault()\n    $(this).tab('show')\n  })\n\n}(window.jQuery);\n"
  },
  {
    "path": "docs/_includes/javascripts/vendor/bootstrap/tooltip.js",
    "content": "/* ========================================================================\n * Bootstrap: tooltip.js v3.0.0\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       =\n    this.options    =\n    this.enabled    =\n    this.timeout    =\n    this.hoverState =\n    this.$element   = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.DEFAULTS = {\n    animation: true\n  , placement: 'top'\n  , selector: false\n  , template: '<div class=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>'\n  , trigger: 'hover focus'\n  , title: ''\n  , delay: 0\n  , html: false\n  , container: false\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled  = true\n    this.type     = type\n    this.$element = $(element)\n    this.options  = this.getOptions(options)\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focus'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay\n      , hide: options.delay\n      }\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.'+ this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      var $tip = this.tip()\n\n      this.setContent()\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n\n      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var $parent = this.$element.parent()\n\n        var orgPlacement = placement\n        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop\n        var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()\n        var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()\n        var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left\n\n        placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :\n                    placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :\n                    placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :\n                    placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n      this.$element.trigger('shown.bs.' + this.type)\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function(offset, placement) {\n    var replace\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  = offset.top  + marginTop\n    offset.left = offset.left + marginLeft\n\n    $tip\n      .offset(offset)\n      .addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      replace = true\n      offset.top = offset.top + height - actualHeight\n    }\n\n    if (/bottom|top/.test(placement)) {\n      var delta = 0\n\n      if (offset.left < 0) {\n        delta       = offset.left * -2\n        offset.left = 0\n\n        $tip.offset(offset)\n\n        actualWidth  = $tip[0].offsetWidth\n        actualHeight = $tip[0].offsetHeight\n      }\n\n      this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')\n    } else {\n      this.replaceArrow(actualHeight - height, actualHeight, 'top')\n    }\n\n    if (replace) $tip.offset(offset)\n  }\n\n  Tooltip.prototype.replaceArrow = function(delta, dimension, position) {\n    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + \"%\") : '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function () {\n    var that = this\n    var $tip = this.tip()\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && this.$tip.hasClass('fade') ?\n      $tip\n        .one($.support.transition.end, complete)\n        .emulateTransitionEnd(150) :\n      complete()\n\n    this.$element.trigger('hidden.bs.' + this.type)\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function () {\n    var el = this.$element[0]\n    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {\n      width: el.offsetWidth\n    , height: el.offsetHeight\n    }, this.$element.offset())\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.tip = function () {\n    return this.$tip = this.$tip || $(this.options.template)\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')\n  }\n\n  Tooltip.prototype.validate = function () {\n    if (!this.$element[0].parentNode) {\n      this.hide()\n      this.$element = null\n      this.options  = null\n    }\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this\n    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n  }\n\n  Tooltip.prototype.destroy = function () {\n    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)\n  }\n\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip = function (option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(window.jQuery);\n"
  },
  {
    "path": "docs/_includes/javascripts/vendor/bootstrap/transition.js",
    "content": "/* ========================================================================\n * Bootstrap: transition.js v3.0.0\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2013 Twitter, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ======================================================================== */\n\n\n+function ($) { \"use strict\";\n\n  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      'WebkitTransition' : 'webkitTransitionEnd'\n    , 'MozTransition'    : 'transitionend'\n    , 'OTransition'      : 'oTransitionEnd otransitionend'\n    , 'transition'       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n  }\n\n  // http://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false, $el = this\n    $(this).one($.support.transition.end, function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n  })\n\n}(window.jQuery);\n"
  },
  {
    "path": "docs/_includes/javascripts/vendor/highlight.pack.js",
    "content": "var hljs=new function(){function l(o){return o.replace(/&/gm,\"&amp;\").replace(/</gm,\"&lt;\").replace(/>/gm,\"&gt;\")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName==\"CODE\"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\\n/g,\"\"):q.nodeValue}if(q.nodeName==\"BR\"){return\"\\n\"}return h(q,o)}).join(\"\")}function a(q){var p=(q.className+\" \"+(q.parentNode?q.parentNode.className:\"\")).split(/\\s+/);p=p.map(function(r){return r.replace(/^language-/,\"\")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]==\"no-highlight\"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName==\"BR\"){s+=1}else{if(t.nodeType==1){o.push({event:\"start\",offset:s,node:t});s=p(t,s);o.push({event:\"stop\",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y=\"\";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event==\"start\"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return\" \"+B.nodeName+'=\"'+l(B.value)+'\"'}return\"<\"+A.nodeName+Array.prototype.map.call(A.attributes,z).join(\"\")+\">\"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event==\"start\"){y+=s(u.node);r.push(u.node)}else{if(u.event==\"stop\"){var o,q=r.length;do{q--;o=r[q];y+=(\"</\"+o.nodeName.toLowerCase()+\">\")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(r){function o(s){return(s&&s.source)||s}function p(t,s){return RegExp(o(t),\"m\"+(r.cI?\"i\":\"\")+(s?\"g\":\"\"))}function q(z,x){if(z.compiled){return}z.compiled=true;var u=[];if(z.k){var s={};function A(B,t){t.split(\" \").forEach(function(C){var D=C.split(\"|\");s[D[0]]=[B,D[1]?Number(D[1]):1];u.push(D[0])})}z.lR=p(z.l||hljs.IR+\"(?!\\\\.)\",true);if(typeof z.k==\"string\"){A(\"keyword\",z.k)}else{for(var y in z.k){if(!z.k.hasOwnProperty(y)){continue}A(y,z.k[y])}}z.k=s}if(x){if(z.bWK){z.b=\"\\\\b(\"+u.join(\"|\")+\")\\\\b(?!\\\\.)\\\\s*\"}z.bR=p(z.b?z.b:\"\\\\B|\\\\b\");if(!z.e&&!z.eW){z.e=\"\\\\B|\\\\b\"}if(z.e){z.eR=p(z.e)}z.tE=o(z.e)||\"\";if(z.eW&&x.tE){z.tE+=(z.e?\"|\":\"\")+x.tE}}if(z.i){z.iR=p(z.i)}if(z.r===undefined){z.r=1}if(!z.c){z.c=[]}for(var w=0;w<z.c.length;w++){if(z.c[w]==\"self\"){z.c[w]=z}q(z.c[w],z)}if(z.starts){q(z.starts,x)}var v=[];for(var w=0;w<z.c.length;w++){v.push(o(z.c[w].b))}if(z.tE){v.push(o(z.tE))}if(z.i){v.push(o(z.i))}z.t=v.length?p(v.join(\"|\"),true):{exec:function(t){return null}}}q(r)}function d(E,F,C){function o(r,N){for(var M=0;M<N.c.length;M++){var L=N.c[M].bR.exec(r);if(L&&L.index==0){return N.c[M]}}}function s(L,r){if(L.e&&L.eR.test(r)){return L}if(L.eW){return s(L.parent,r)}}function t(r,L){return !C&&L.i&&L.iR.test(r)}function y(M,r){var L=G.cI?r[0].toLowerCase():r[0];return M.k.hasOwnProperty(L)&&M.k[L]}function H(){var L=l(w);if(!A.k){return L}var r=\"\";var O=0;A.lR.lastIndex=0;var M=A.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=y(A,M);if(N){v+=N[1];r+='<span class=\"'+N[0]+'\">'+M[0]+\"</span>\"}else{r+=M[0]}O=A.lR.lastIndex;M=A.lR.exec(L)}return r+L.substr(O)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class=\"'+r.language+'\">'+r.value+\"</span>\"}function K(){return A.sL!==undefined?z():H()}function J(M,r){var L=M.cN?'<span class=\"'+M.cN+'\">':\"\";if(M.rB){x+=L;w=\"\"}else{if(M.eB){x+=l(r)+L;w=\"\"}else{x+=L;w=r}}A=Object.create(M,{parent:{value:A}})}function D(L,r){w+=L;if(r===undefined){x+=K();return 0}var N=o(r,A);if(N){x+=K();J(N,r);return N.rB?0:r.length}var O=s(A,r);if(O){var M=A;if(!(M.rE||M.eE)){w+=r}x+=K();do{if(A.cN){x+=\"</span>\"}B+=A.r;A=A.parent}while(A!=O.parent);if(M.eE){x+=l(r)}w=\"\";if(O.starts){J(O.starts,\"\")}return M.rE?0:r.length}if(t(r,A)){throw new Error('Illegal lexem \"'+r+'\" for mode \"'+(A.cN||\"<unnamed>\")+'\"')}w+=r;return r.length||1}var G=e[E];f(G);var A=G;var w=\"\";var B=0;var v=0;var x=\"\";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(F);if(!u){break}q=D(F.substr(p,u.index-p),u[0]);p=u.index+q}D(F.substr(p));return{r:B,keyword_count:v,value:x,language:E}}catch(I){if(I.message.indexOf(\"Illegal\")!=-1){return{r:0,keyword_count:0,value:l(F)}}else{throw I}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\\t)+)/gm,function(r,v,u,t){return v.replace(/\\t/g,p)})}if(o){q=q.replace(/\\n/g,\"<br>\")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t==\"no-highlight\"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement(\"pre\");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match(\"(\\\\s|^)(language-)?\"+t+\"(\\\\s|$)\")){s=s?(s+\" \"+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName(\"pre\"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener(\"DOMContentLoaded\",n,false);window.addEventListener(\"load\",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR=\"[a-zA-Z][a-zA-Z0-9_]*\";this.UIR=\"[a-zA-Z_][a-zA-Z0-9_]*\";this.NR=\"\\\\b\\\\d+(\\\\.\\\\d+)?\";this.CNR=\"(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\";this.BNR=\"\\\\b(0b[01]+)\";this.RSR=\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|\\\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\";this.BE={b:\"\\\\\\\\[\\\\s\\\\S]\",r:0};this.ASM={cN:\"string\",b:\"'\",e:\"'\",i:\"\\\\n\",c:[this.BE],r:0};this.QSM={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[this.BE],r:0};this.CLCM={cN:\"comment\",b:\"//\",e:\"$\"};this.CBLCLM={cN:\"comment\",b:\"/\\\\*\",e:\"\\\\*/\"};this.HCM={cN:\"comment\",b:\"#\",e:\"$\"};this.NM={cN:\"number\",b:this.NR,r:0};this.CNM={cN:\"number\",b:this.CNR,r:0};this.BNM={cN:\"number\",b:this.BNR,r:0};this.REGEXP_MODE={cN:\"regexp\",b:/\\//,e:/\\/[gim]*/,i:/\\n/,c:[this.BE,{b:/\\[/,e:/\\]/,r:0,c:[this.BE]}]};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.javascript=function(a){return{k:{keyword:\"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const\",literal:\"true false null undefined NaN Infinity\"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:\"(\"+a.RSR+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",k:\"return throw case\",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/</,e:/>;/,sL:\"xml\"}],r:0},{cN:\"function\",bWK:true,e:/{/,k:\"function\",c:[{cN:\"title\",b:/[A-Za-z$_][0-9A-Za-z$_]*/},{cN:\"params\",b:/\\(/,e:/\\)/,c:[a.CLCM,a.CBLCLM],i:/[\"'\\(]/}],i:/\\[|%/}]}}(hljs);hljs.LANGUAGES.css=function(a){var b=\"[a-zA-Z-][a-zA-Z0-9_-]*\";var c={cN:\"function\",b:b+\"\\\\(\",e:\"\\\\)\",c:[\"self\",a.NM,a.ASM,a.QSM]};return{cI:true,i:\"[=/|']\",c:[a.CBLCLM,{cN:\"id\",b:\"\\\\#[A-Za-z0-9_-]+\"},{cN:\"class\",b:\"\\\\.[A-Za-z0-9_-]+\",r:0},{cN:\"attr_selector\",b:\"\\\\[\",e:\"\\\\]\",i:\"$\"},{cN:\"pseudo\",b:\":(:)?[a-zA-Z0-9\\\\_\\\\-\\\\+\\\\(\\\\)\\\\\\\"\\\\']+\"},{cN:\"at_rule\",b:\"@(font-face|page)\",l:\"[a-z-]+\",k:\"font-face page\"},{cN:\"at_rule\",b:\"@\",e:\"[{;]\",c:[{cN:\"keyword\",b:/\\S+/},{b:/\\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:\"tag\",b:b,r:0},{cN:\"rules\",b:\"{\",e:\"}\",i:\"[^\\\\s]\",r:0,c:[a.CBLCLM,{cN:\"rule\",b:\"[^\\\\s]\",rB:true,e:\";\",eW:true,c:[{cN:\"attribute\",b:\"[A-Z\\\\_\\\\.\\\\-]+\",e:\":\",eE:true,i:\"[^\\\\s]\",starts:{cN:\"value\",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:\"hexcolor\",b:\"#[0-9A-Fa-f]+\"},{cN:\"important\",b:\"!important\"}]}}]}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c=\"[A-Za-z0-9\\\\._:-]+\";var b={eW:true,r:0,c:[{cN:\"attribute\",b:c,r:0},{b:'=\"',rB:true,e:'\"',c:[{cN:\"value\",b:'\"',eW:true}]},{b:\"='\",rB:true,e:\"'\",c:[{cN:\"value\",b:\"'\",eW:true}]},{b:\"=\",c:[{cN:\"value\",b:\"[^\\\\s/>]+\"}]}]};return{cI:true,c:[{cN:\"pi\",b:\"<\\\\?\",e:\"\\\\?>\",r:10},{cN:\"doctype\",b:\"<!DOCTYPE\",e:\">\",r:10,c:[{b:\"\\\\[\",e:\"\\\\]\"}]},{cN:\"comment\",b:\"<!--\",e:\"-->\",r:10},{cN:\"cdata\",b:\"<\\\\!\\\\[CDATA\\\\[\",e:\"\\\\]\\\\]>\",r:10},{cN:\"tag\",b:\"<style(?=\\\\s|>|$)\",e:\">\",k:{title:\"style\"},c:[b],starts:{e:\"</style>\",rE:true,sL:\"css\"}},{cN:\"tag\",b:\"<script(?=\\\\s|>|$)\",e:\">\",k:{title:\"script\"},c:[b],starts:{e:\"<\\/script>\",rE:true,sL:\"javascript\"}},{b:\"<%\",e:\"%}\",sL:\"vbscript\"},{cN:\"tag\",b:\"</?\",e:\"/?>\",r:0,c:[{cN:\"title\",b:\"[^ /><]+\"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:\"true false null\"};var d=[a.QSM,a.CNM];var c={cN:\"value\",e:\",\",eW:true,eE:true,c:d,k:e};var b={b:\"{\",e:\"}\",c:[{cN:\"attribute\",b:'\\\\s*\"',e:'\"\\\\s*:\\\\s*',eB:true,eE:true,c:[a.BE],i:\"\\\\n\",starts:c}],i:\"\\\\S\"};var f={b:\"\\\\[\",e:\"\\\\]\",c:[a.inherit(c,{cN:null})],i:\"\\\\S\"};d.splice(d.length,0,b,f);return{c:d,k:e,i:\"\\\\S\"}}(hljs);"
  },
  {
    "path": "docs/_includes/menu.html",
    "content": "<div class=\"docs-menu\">\n\n  <h4>Overview</h4>\n  <ul>\n    <li {% if page.path == \"/overview/download\" %}class=\"active\"{% endif %}><a href=\"{{ \"/overview/download\" | relative_url }}\">Download</a></li>\n    <li {% if page.path == \"/overview\" %}class=\"active\"{% endif %}><a href=\"{{ \"/overview\" | relative_url }}\">TLDR / Features</a></li>\n    <li {% if page.path == \"/overview/changelog\" %}class=\"active\"{% endif %}><a href=\"{{ \"/overview/changelog\" | relative_url }}\">Changelog</a></li>\n    <li {% if page.path == \"/overview/contribute\" %}class=\"active\"{% endif %}><a href=\"{{ \"/overview/contribute\" | relative_url }}\">Contribute</a></li>\n    <li><a href=\"https://github.com/javve/list.js\" target=\"_blank\">GitHub</a></li>\n  </ul>\n\n  <h4>Documentation</h4>\n  <ul>\n    <li {% if page.path == \"/docs\" %}class=\"active\"{% endif %}><a href=\"{{ \"/docs\" | relative_url }}\">Getting started</a></li>\n    <li {% if page.path == \"/docs/list-api\" %}class=\"active\"{% endif %}><a href=\"{{ \"/api\" | relative_url }}\">List API</a></li>\n    <li {% if page.path == \"/docs/item-api\" %}class=\"active\"{% endif %}><a href=\"{{ \"/docs/item-api\" | relative_url }}\">Item API</a></li>\n    <li {% if page.path == \"/docs/search-sort\" %}class=\"active\"{% endif %}><a href=\"{{ \"/docs/search-sort\" | relative_url }}\">Searching + Sorting</a></li>\n    <li {% if page.path == \"/faq\" %}class=\"active\"{% endif %}><a href=\"{{ \"/faq\" | relative_url }}\">FAQ</a></li>\n  </ul>\n\n  <h4>Examples</h4>\n  <ul>\n    {% for example in site.examples %}\n    <li><a href=\"{{ example.url | relative_url }}\">{{example.name}}</a></li>\n    {% endfor %}\n  </ul>\n</div>\n"
  },
  {
    "path": "docs/_layouts/default.html",
    "content": "<!doctype html>\n\n<!--[if lt IE 7 ]> <html lang=\"en\" class=\"no-js ie6\"> <![endif]-->\n<!--[if IE 7 ]>    <html lang=\"en\" class=\"no-js ie7\"> <![endif]-->\n<!--[if IE 8 ]>    <html lang=\"en\" class=\"no-js ie8\"> <![endif]-->\n<!--[if IE 9 ]>    <html lang=\"en\" class=\"no-js ie9\"> <![endif]-->\n<!--[if (gt IE 9)|!(IE)]><!--> <html lang=\"en\" class=\"no-js\"> <!--<![endif]-->\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\n    <title>{{ page.title }} - {{ site.title }}</title>\n    <meta name=\"description\" content=\"{{ site.description }}\">\n    <meta name=\"author\" content=\"Jonny Strömberg\">\n    <meta name=\"google-site-verification\" content=\"CxtqsFWhMxG32DK5A7Hbtg1ficvqhu9sybSeDP25JpI\" />\n\n    <link rel=\"dns-prefetch\" href=\"//fonts.googleapis.com\">\n    <link rel=\"dns-prefetch\" href=\"//fonts.gstatic.com\">\n    <link rel=\"dns-prefetch\" href=\"//platform.twitter.com\">\n    <link rel=\"dns-prefetch\" href=\"//www.facebook.com\">\n    <link rel=\"shortcut icon\" href=\"{{ \"/assets/images/graphics/favicon.ico\" | relative_url }}\">\n    <link rel=\"stylesheet\" href=\"{{ \"/assets/css/style.css\" | relative_url }}\">\n\n    <!-- Open graph -->\n    <meta property=\"og:title\" content=\"{{ site.title }}\" />\n    <meta property=\"og:description\" content=\"{{ site.description }}\" />\n    <meta property=\"og:type\" content=\"website\" />\n    <meta property=\"og:url\" content=\"{{ page.url | relative_url }}\" />\n    <meta property=\"og:image\" content=\"{{ \"/assets/images/graphics/listjs-logo.png\" | relative_url }}\" />\n\n    <!-- Twitter card -->\n    <meta property=\"twitter:card\" content=\"summary\" />\n    <meta property=\"twitter:title\" content=\"{{ site.title }}\" />\n    <meta property=\"twitter:site\" content=\"@javve\" />\n    <meta property=\"twitter:description\" content=\"{{ site.description }}\" />\n    <meta property=\"twitter:image:src\" content=\"{{ \"/assets/images/graphics/listjs-logo.png\" | relative_url }}\" />\n\n    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,200,300,600,700' rel='stylesheet' type='text/css'>\n    <script type=\"text/javascript\">\n\n      var _gaq = _gaq || [];\n      _gaq.push(['_setAccount', 'UA-26278829-1']);\n      _gaq.push(['_trackPageview']);\n\n      (function() {\n        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n      })();\n\n    </script>\n    <script async src=\"https://hosted.okayanalytics.com/tracker.js?tid=OA-OVYXYEWW\"></script>\n</head>\n\n<body>\n\n  <div class=\"menu\">\n    <div class=\"container\">\n      <ul class=\"main\">\n        <li style=\"display:none;\"><a href=\"http://javve.com\">Javve.com</a></li>\n        <li style=\"font-size:22px;\"><a href=\"/\"><b>List.js</b></a></li>\n        <li><iframe style=\"position: relative; top: 3px;\" src=\"https://ghbtns.com/github-btn.html?user=javve&repo=list.js&type=watch&count=true\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"0\" width=\"100px\" height=\"20px\"></iframe></li>\n        <li style=\"float:right; margin-right:0;\"><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E\">Support List.js <span class=\"heart\">❤️</span></a></li>\n      </ul>\n    </div>\n  </div>\n\n  <div class=\"container\">\n    <div class=\"docs\">\n      {% include menu.html %}\n      <div class=\"docs-content\">\n        {{ content }}\n      </div>\n    </div>\n  </div>\n\n  <div class=\"footer\">\n    <div class=\"misc-share\">\n      <iframe src=\"https://ghbtns.com/github-btn.html?user=javve&repo=list.js&type=fork&count=true\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"0\" width=\"95px\" height=\"20px\"></iframe>\n      <div class=\"tweet misc-share-button\"><a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-text=\"List.js - The perfect library for adding search, sort, filters & flexibility to tables, lists, or anything\" data-count=\"horizontal\" data-via=\"javve\" data-url=\"http://listjs.com\">Tweet</a></div>\n      <div class=\"facebook misc-share-button\"><div class=\"fb-like\" data-href=\"http://listjs.com\" data-width=\"80\" data-height=\"20\" data-colorscheme=\"light\" data-layout=\"button_count\" data-action=\"like\" data-show-faces=\"true\" data-send=\"false\"></div></div>\n      <div class=\"gplus misc-share-button\"><div class=\"g-plusone\" data-size=\"medium\" data-href=\"http://listjs.com\"></div></div>\n    </div>\n  </div>\n\n  {% include carbon.html %}\n\n  <script src=\"{{ \"/assets/javascripts/list.min.js\" | relative_url }}\"></script>\n  <script src=\"{{\"/assets/javascripts/main.js\" | relative_url }}\"></script>\n  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>\n  <div id=\"fb-root\"></div>\n  <script>(function(d, s, id) {\n    var js, fjs = d.getElementsByTagName(s)[0];\n    if (d.getElementById(id)) return;\n    js = d.createElement(s); js.id = id;\n    js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1&appId=488461091214550\";\n    fjs.parentNode.insertBefore(js, fjs);\n  }(document, 'script', 'facebook-jssdk'));</script>\n\n  <!-- Place this tag after the last +1 button tag. -->\n  <script type=\"text/javascript\">\n    (function() {\n      var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;\n      po.src = 'https://apis.google.com/js/plusone.js';\n      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n    })();\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "docs/_sass/_base.scss",
    "content": "/**\n * Basic styling\n */\nbody {\n  font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;\n  color: $text-color;\n  background-color: $background-color;\n  -webkit-text-size-adjust: 100%;\n  -webkit-font-feature-settings: \"kern\" 1;\n  -moz-font-feature-settings: \"kern\" 1;\n  -o-font-feature-settings: \"kern\" 1;\n  font-feature-settings: \"kern\" 1;\n  font-kerning: normal;\n  @include transition(background-color .2s ease-in-out);\n}\n\n\n\n/**\n * Set `margin-bottom` to maintain vertical rhythm\n */\nh1, h2, h3, h4, h5, h6,\np, blockquote, pre,\nul, ol, dl, figure,\n%vertical-rhythm {\n  margin-top:0;\n  margin-bottom: $spacing-unit / 2;\n}\n\n\n\n/**\n * Images\n */\nimg {\n  max-width: 100%;\n  vertical-align: middle;\n}\n\n\n\n/**\n * Figures\n */\nfigure > img {\n  display: block;\n}\n\nfigcaption {\n  font-size: $small-font-size;\n}\n\n\n\n/**\n * Lists\n */\nul, ol {\n  margin-left: $spacing-unit;\n}\n\nli {\n  > ul,\n  > ol {\n     margin-bottom: 0;\n  }\n}\n\n\n\n/**\n * Headings\n */\nh1, h2, h3, h4, h5, h6 {\n  font-family: $headline-font-family;\n  font-weight: $headline-font-weight;\n}\n\n\n\n/**\n * Links\n */\na {\n  color: $brand-color;\n  text-decoration: none;\n\n  &:visited {\n    color: darken($brand-color, 15%);\n  }\n\n  &:hover {\n    color: $text-color;\n    text-decoration: underline;\n  }\n}\n\n\n\n/**\n * Blockquotes\n */\nblockquote {\n  color: $grey-color;\n  border-left: 4px solid $grey-color-light;\n  padding-left: $spacing-unit / 2;\n  font-size: 18px;\n  letter-spacing: -1px;\n  font-style: italic;\n\n  > :last-child {\n    margin-bottom: 0;\n  }\n}\n\n\n\n/**\n * Code formatting\n */\npre,\ncode {\n  font-size: 15px;\n  border: 1px solid $grey-color-light;\n  border-radius: 3px;\n  background-color: #eef;\n}\n\ncode {\n  padding: 1px 5px;\n}\n\npre {\n  padding: 8px 12px;\n  overflow-x: auto;\n\n  > code {\n    border: 0;\n    padding-right: 0;\n    padding-left: 0;\n  }\n}\n\n\n\n/**\n * Wrapper\n */\n.wrapper {\n  max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));\n  max-width:     calc(#{$content-width} - (#{$spacing-unit} * 2));\n  margin-right: auto;\n  margin-left: auto;\n  padding-right: $spacing-unit;\n  padding-left: $spacing-unit;\n  @extend %clearfix;\n\n  @include media-query($on-laptop) {\n    max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));\n    max-width:     calc(#{$content-width} - (#{$spacing-unit}));\n    padding-right: $spacing-unit / 2;\n    padding-left: $spacing-unit / 2;\n  }\n}\n\n.content-container {\n  background-color: #fff;\n  box-sizing: border-box;\n  max-width: $content-width;\n  margin:- $spacing-unit auto $spacing-unit;\n}\n.content {\n  @include transition(all .2s ease-in-out);\n  padding: $spacing-unit;\n  @include media-query($on-laptop) {\n    padding:$spacing-unit * 2;\n  }\n  &:after {\n    content: \"\";\n    display: table;\n    clear: both;\n  }\n}\n\n.image-shadow-box {\n  border: solid $spacing-unit / 2 #fff;\n  box-shadow: 5px 10px 40px rgba(0,0,0,.3);\n}\n.image-right-50 {\n  float:right;\n  margin-left:$spacing-unit * 2;\n  margin-bottom:$spacing-unit;\n  max-width: 45%;\n}\n"
  },
  {
    "path": "docs/_sass/_carbonads.scss",
    "content": "@keyframes fadein {\n  from {\n    transform: translateY(100%);\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n@-moz-keyframes fadein {\n  from {\n    transform: translateY(100%);\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n@-webkit-keyframes fadein {\n  from {\n    transform: translateY(100%);\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n@-ms-keyframes fadein {\n  from {\n    transform: translateY(100%);\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n@-o-keyframes fadein {\n  from {\n    transform: translateY(100%);\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n#carbonads {\n  position: fixed;\n  z-index: 10000;\n  right: 0;\n  bottom: 0;\n  opacity: 0;\n  transform: translateY(100%);\n  -webkit-animation: fadein 1s 2s forwards;\n  -moz-animation: fadein 1s 2s forwards;\n  -ms-animation: fadein 1s 2s forwards;\n  -o-animation: fadein 1s 2s forwards;\n  animation: fadein 1s 2s forwards\n}\n\n#carbonads {\n  display: block;\n  overflow: hidden;\n  padding: 1em;\n  background-color: hsla(0, 0%, 100%, .88);\n  max-width: 330px;\n  box-shadow: 0 0 1px 0 hsla(0, 0%, 0%, .6);\n  font-size: 14px;\n  border-top-left-radius: 4px;\n  line-height: 1.5;\n}\n\n#carbonads a {\n  text-decoration: none;\n}\n\n#carbonads span {\n  position: relative;\n  display: block;\n  overflow: hidden;\n}\n\n.carbon-img {\n  float: left;\n  margin-right: 1em;\n}\n\n.carbon-img img {\n  display: block;\n}\n\n.carbon-text {\n  display: block;\n  float: left;\n  max-width: calc(100% - 130px - 1em);\n  text-align: left;\n}\n\n.carbon-poweredby {\n  position: absolute;\n  right: 0;\n  bottom: 0;\n  display: block;\n  font-size: 10px;\n  color: hsl(0, 0%, 60%);\n  text-transform: uppercase;\n  line-height: 1;\n  letter-spacing: 1px;\n}\n"
  },
  {
    "path": "docs/_sass/_docs.scss",
    "content": ".docs {\n  display: -webkit-flex;\n  display: -ms-flexbox;\n  display: flex;\n\n  -webkit-flex-wrap: wrap;\n  -ms-flex-wrap: wrap;\n  flex-wrap: wrap;\n}\n.docs-menu {\n  background-color:$blue;\n  max-width: $menuWidth;\n  position: relative;\n  padding: 0 20px;\n  box-sizing: border-box;\n  flex: 1;\n\n  a {\n    transition: opacity .2s ease-in-out;\n    color:#fff;\n    text-decoration: none;\n    &:hover {\n      opacity: 0.7;\n      color:#fff;\n    }\n  }\n  ul {\n    padding-left:20px;\n    color:rgba(255,255,255,0.3);\n  }\n  li {\n    margin-bottom:4px;\n    &.active {\n      font-weight: 700;\n      color:#fff;\n    }\n  }\n}\n\n.docs-content {\n  position: relative;\n  color:#555;\n  padding:30px;\n  box-sizing: border-box;\n\n  flex: 1;\n\n  h2:first-child {\n    margin-top: 0;\n  }\n  p, h1, h2, h3, h4, h5 {\n    max-width: 500px;\n  }\n  p {\n    line-height: 1.5;\n  }\n  ul {\n    padding-left:30px;\n    pre {\n      margin-left:-60px;\n      padding-left:60px;\n    }\n    ul pre {\n      margin-left:-90px;\n      padding-left:90px;\n    }\n  }\n  strong, b {\n    color:#222;\n    font-weight: bold;\n  }\n  pre {\n    background-color: $lightGrey;\n    padding:20px 30px;\n    margin:0 -30px 1px;\n    code {\n      background-color: transparent;\n    }\n  }\n  li {\n    margin-bottom:5px;\n  }\n  .api-index {\n    -webkit-column-count: 3;\n       -moz-column-count: 3;\n            column-count: 3;\n    margin:0;\n    padding:0;\n    li {\n      list-style-type: none;\n      margin-bottom: 0;\n    }\n  }\n}\n.docs-parameter-description {\n  color:#999;\n  font-size:80%;\n}\n\n.docs-top {\n  display:none;\n  border-bottom:solid 1px $lightGrey;\n  padding:20px;\n  .docs-top-title {\n    font-size: 50px;\n    font-size: 5rem;\n    color:$orange;\n    font-weight:700;\n    margin:0;\n  }\n}\n"
  },
  {
    "path": "docs/_sass/_menu.scss",
    "content": "@-webkit-keyframes pluse {\n\t0% {\n\t\t-webkit-transform: scale(1);\n\t}\n\t80% {\n\t\t-webkit-transform: scale(1.2);\n\t}\n  100% {\n    -webkit-transform: scale(1);\n  }\n}\n@keyframes pluse {\n\t0% {\n\t\ttransform: scale(1);\n\t}\n\t80% {\n\t\ttransform: scale(1.2);\n\t}\n  100% {\n    transform: scale(1);\n  }\n}\n\n.menu {\n  padding:0 20px;\n  z-index: 100;\n  //margin-top:-80px;\n  //margin-bottom:40px;\n  margin:0;\n  background-color: $black;\n\n  .heart {\n    -webkit-animation: pluse 1.4s infinite linear;\n    animation: pluse 1.4s infinite linear;\n    position:relative;\n    top:2px;\n    right:-3px;\n    display: inline-block;\n  }\n\n  ul {\n    display:block;\n    margin:0;\n    padding:0;\n  }\n  li {\n    display:inline-block;\n    margin:0 10px 0 0;\n  }\n  a {\n    line-height:60px;\n    display: inline-block;\n    text-decoration: none;\n    font-weight: 600;\n    color:#fff;\n    &:hover,\n    &.active {\n      color:#eee;\n    }\n    &.active {\n      font-weight: 500;\n      color:$black;\n    }\n  }\n}\n\n.menu-sub {\n  margin:-40px 0 20px;\n  color: #ccc;\n  background-color:$lightGrey;\n  font-size:14px;\n  font-size:1.4rem;\n  @extend %clearfix;\n  ul {\n    padding: 15px 0 13px;\n    margin:0;\n  }\n  li {\n    display: inline-block;\n    margin-right:20px;\n    &.active {\n      a {\n        color:#222;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "docs/_sass/_mixins.scss",
    "content": "%clearfix {\n  &:after {\n    content: \"\";\n    display: table;\n    clear: both;\n  }\n}\n\n@mixin media-query($device) {\n  @media screen and (min-width: $device) {\n    @content;\n  }\n}\n\n\n@mixin transition($value){\n  -webkit-transition: $value;\n  transition: $value;\n}\n"
  },
  {
    "path": "docs/_sass/_normalize.scss",
    "content": "/*! normalize.css v2.1.3 | MIT License | git.io/normalize */\n\n/* ==========================================================================\n   HTML5 display definitions\n   ========================================================================== */\n\n/**\n * Correct `block` display not defined in IE 8/9.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n    display: block;\n}\n\n/**\n * Correct `inline-block` display not defined in IE 8/9.\n */\n\naudio,\ncanvas,\nvideo {\n    display: inline-block;\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n    display: none;\n    height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9.\n * Hide the `template` element in IE, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n    display: none;\n}\n\n/* ==========================================================================\n   Base\n   ========================================================================== */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n *    user zoom.\n */\n\nhtml {\n    font-family: sans-serif; /* 1 */\n    -ms-text-size-adjust: 100%; /* 2 */\n    -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n    margin: 0;\n}\n\n/* ==========================================================================\n   Links\n   ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n    background: transparent;\n}\n\n/**\n * Address `outline` inconsistency between Chrome and other browsers.\n */\n\na:focus {\n    outline: thin dotted;\n}\n\n/**\n * Improve readability when focused and also mouse hovered in all browsers.\n */\n\na:active,\na:hover {\n    outline: 0;\n}\n\n/* ==========================================================================\n   Typography\n   ========================================================================== */\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari 5, and Chrome.\n */\n\nh1 {\n    font-size: 2em;\n    margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9, Safari 5, and Chrome.\n */\n\nabbr[title] {\n    border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\n\nb,\nstrong {\n    font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\n\ndfn {\n    font-style: italic;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n    -moz-box-sizing: content-box;\n    box-sizing: content-box;\n    height: 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n    background: #ff0;\n    color: #000;\n}\n\n/**\n * Correct font family set oddly in Safari 5 and Chrome.\n */\n\ncode,\nkbd,\npre,\nsamp {\n    font-family: monospace, serif;\n    font-size: 1em;\n}\n\n/**\n * Improve readability of pre-formatted text in all browsers.\n */\n\npre {\n    white-space: pre-wrap;\n}\n\n/**\n * Set consistent quote types.\n */\n\nq {\n    quotes: \"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\";\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n    font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n    font-size: 75%;\n    line-height: 0;\n    position: relative;\n    vertical-align: baseline;\n}\n\nsup {\n    top: -0.5em;\n}\n\nsub {\n    bottom: -0.25em;\n}\n\n/* ==========================================================================\n   Embedded content\n   ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9.\n */\n\nimg {\n    border: 0;\n}\n\n/**\n * Correct overflow displayed oddly in IE 9.\n */\n\nsvg:not(:root) {\n    overflow: hidden;\n}\n\n/* ==========================================================================\n   Figures\n   ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari 5.\n */\n\nfigure {\n    margin: 0;\n}\n\n/* ==========================================================================\n   Forms\n   ========================================================================== */\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n    border: 1px solid #c0c0c0;\n    margin: 0 2px;\n    padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n    border: 0; /* 1 */\n    padding: 0; /* 2 */\n}\n\n/**\n * 1. Correct font family not being inherited in all browsers.\n * 2. Correct font size not being inherited in all browsers.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n */\n\nbutton,\ninput,\nselect,\ntextarea {\n    font-family: inherit; /* 1 */\n    font-size: 100%; /* 2 */\n    margin: 0; /* 3 */\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\nbutton,\ninput {\n    line-height: normal;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.\n * Correct `select` style inheritance in Firefox 4+ and Opera.\n */\n\nbutton,\nselect {\n    text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n *    and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n *    `input` and others.\n */\n\nbutton,\nhtml input[type=\"button\"], /* 1 */\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n    -webkit-appearance: button; /* 2 */\n    cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n    cursor: default;\n}\n\n/**\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n    box-sizing: border-box; /* 1 */\n    padding: 0; /* 2 */\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n *    (include `-moz` to future-proof).\n */\n\ninput[type=\"search\"] {\n    -webkit-appearance: textfield; /* 1 */\n    -moz-box-sizing: content-box;\n    -webkit-box-sizing: content-box; /* 2 */\n    box-sizing: content-box;\n}\n\n/**\n * Remove inner padding and search cancel button in Safari 5 and Chrome\n * on OS X.\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n    -webkit-appearance: none;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n    border: 0;\n    padding: 0;\n}\n\n/**\n * 1. Remove default vertical scrollbar in IE 8/9.\n * 2. Improve readability and alignment in all browsers.\n */\n\ntextarea {\n    overflow: auto; /* 1 */\n    vertical-align: top; /* 2 */\n}\n\n/* ==========================================================================\n   Tables\n   ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n    border-collapse: collapse;\n    border-spacing: 0;\n}\n"
  },
  {
    "path": "docs/_sass/vendor/highlight/xcode.scss",
    "content": "/*\n\nXCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>\n\n*/\n\npre code {\n  display: block; padding: 0.5em;\n  background: #fff; color: black;\n}\n\npre .comment,\npre .template_comment,\npre .javadoc,\npre .comment * {\n  color: rgba(0, 0, 0, 0.27);\n}\n\npre .keyword,\npre .literal,\npre .nginx .title {\n  color: rgb(170,13,145);\n}\npre .method,\npre .list .title,\npre .tag .title,\npre .setting .value,\npre .winutils,\npre .tex .command,\npre .http .title,\npre .request,\npre .status {\n  color: #008;\n}\n\npre .envvar,\npre .tex .special {\n  color: #660;\n}\n\npre .string {\n  color: rgb(196,26,22);\n}\npre .tag .value,\npre .cdata,\npre .filter .argument,\npre .attr_selector,\npre .apache .cbracket,\npre .date,\npre .regexp {\n  color: #080;\n}\n\npre .sub .identifier,\npre .pi,\npre .tag,\npre .tag .keyword,\npre .decorator,\npre .ini .title,\npre .shebang,\npre .prompt,\npre .hexcolor,\npre .rules .value,\npre .css .value .number,\npre .symbol,\npre .symbol .string,\npre .number,\npre .css .function,\npre .clojure .title,\npre .clojure .built_in,\npre .function .title,\npre .coffeescript .attribute {\n  color: rgb(28,0,207);\n}\n\npre .class .title,\npre .haskell .type,\npre .smalltalk .class,\npre .javadoctag,\npre .yardoctag,\npre .phpdoc,\npre .typename,\npre .tag .attribute,\npre .doctype,\npre .class .id,\npre .built_in,\npre .setting,\npre .params,\npre .clojure .attribute {\n  color: rgb(92,38,153);\n}\n\npre .variable {\n color: rgb(63,110,116);\n}\npre .css .tag,\npre .rules .property,\npre .pseudo,\npre .subst {\n  color: #000;\n}\n\npre .css .class, pre .css .id {\n  color: #9B703F;\n}\n\npre .value .important {\n  color: #ff7700;\n  font-weight: bold;\n}\n\npre .rules .keyword {\n  color: #C5AF75;\n}\n\npre .annotation,\npre .apache .sqbracket,\npre .nginx .built_in {\n  color: #9B859D;\n}\n\npre .preprocessor,\npre .preprocessor * {\n  color: rgb(100,56,32);\n}\n\npre .tex .formula {\n  background-color: #EEE;\n  font-style: italic;\n}\n\npre .diff .header,\npre .chunk {\n  color: #808080;\n  font-weight: bold;\n}\n\npre .diff .change {\n  background-color: #BCCFF9;\n}\n\npre .addition {\n  background-color: #BAEEBA;\n}\n\npre .deletion {\n  background-color: #FFC8BD;\n}\n\npre .comment .yardoctag {\n  font-weight: bold;\n}\n\npre .method .id {\n  color: #000;\n}\n"
  },
  {
    "path": "docs/api.html",
    "content": "---\nlayout: default\ntitle: List API\nredirect_from:\n  - /docs/list-api\n  - /docs/options\n---\n\n<h2>\n    <a name=\"parameters\" class=\"anchor\" href=\"#API\"><span class=\"octicon octicon-link\"></span></a>\n    List API\n</h2>\n\n<h4>Options</h4>\n<ul class=\"api-index\">\n  <li><a href=\"#i\">i</a></li>\n  <li><a href=\"#indexAsync\">indexAsync</a></li>\n  <li><a href=\"#item\">item</a></li>\n  <li><a href=\"#listClass\">listClass</a></li>\n  <li><a href=\"#page\">page</a></li>\n  <li><a href=\"#pagination\">pagination</a></li>\n  <li><a href=\"#searchClass\">searchClass</a></li>\n  <li><a href=\"#searchColumns\">searchColumns</a></li>\n  <li><a href=\"#searchDelay\">searchDelay</a></li>\n  <li><a href=\"#sortClass\">sortClass</a></li>\n  <li><a href=\"#valueNames\">valueNames</a></li>\n</ul>\n\n<h4>Properties</h4>\n\n<ul class=\"api-index\">\n  <li><a href=\"#filtered\">filtered</a></li>\n  <li><a href=\"#items\">items</a></li>\n  <li><a href=\"#list\">list</a></li>\n  <li><a href=\"#listContainer\">listContainer</a></li>\n  <li><a href=\"#matchingItems\">matchingItems</a></li>\n  <li><a href=\"#searched\">searched</a></li>\n  <li><a href=\"#visibleItems\">visibleItems</a></li>\n</ul>\n\n<h4>Methods</h4>\n<ul class=\"api-index\">\n  <li><a href=\"#add\">add</a></li>\n  <li><a href=\"#clear\">clear</a></li>\n  <li><a href=\"#filter\">filter</a></li>\n  <li><a href=\"#fuzzysearch\">fuzzySearch</a></li>\n  <li><a href=\"#get\">get</a></li>\n  <li><a href=\"#on\">on</a></li>\n  <li><a href=\"#reindex\">reIndex</a></li>\n  <li><a href=\"#remove\">remove</a></li>\n  <li><a href=\"#search\">search</a></li>\n  <li><a href=\"#size\">size</a></li>\n  <li><a href=\"#show\">show</a></li>\n  <li><a href=\"#sort\">sort</a></li>\n  <li><a href=\"#update\">update</a></li>\n</ul>\n\n<h3>\n    <a name=\"parameters\" class=\"anchor\" href=\"#parameters\"><span class=\"octicon octicon-link\"></span></a>\n    Options\n</h3>\n<p>Using List.js is pretty much plug and play, but you can change some options if you feel like it.</p>\n<pre><code>new List(id/element, options, values);</code></pre>\n\n<ul>\n<li>\n    <strong><a name=\"id\" href=\"#id\" class=\"anchor\"></a>id</strong> or <strong><a name=\"element\" href=\"#element\" class=\"anchor\"></a>element</strong> <em class=\"docs-parameter-description\">*required</em><br>\n    Id the element in which the list area should be initialized. OR the actual element itself.\n</li>\n<li>\n<p><strong><a name=\"options\" href=\"#options\" class=\"anchor\"></a>options</strong> <em class=\"docs-parameter-description\">Object, default: undefined</em><br>\nSome of the option parameters are required at some times</p>\n\n<ul>\n<li>\n<p><strong><a name=\"valueNames\" href=\"#valueNames\" class=\"anchor\"></a>valueNames</strong> <em class=\"docs-parameter-description\">Array, default: null. *required</em><br>\nIf the list contains items on initialization, then this array\nhas to contain the value names (class names) for the different values of\neach list item.</p>\n\n<pre><code>&lt;ul class=\"list\"&gt;\n    &lt;li&gt;\n        &lt;span class=\"name\"&gt;Jonny&lt;/span&gt;\n        &lt;span class=\"city\"&gt;Sundsvall&lt;/span&gt;\n    &lt;/li&gt;\n&lt;/ul&gt;\n\nvar valueNames = ['name', 'city'];\n</code></pre>\n\n<pre><code>&lt;ul class=\"list\">\n &lt;li data-id=\"1\">\n   &lt;a href=\"http://javve.com\" class=\"link name\">Jonny&lt;/a>\n   &lt;p class=\"born timestamp\" data-timestamp=\"1234\">1986&lt;/p>\n   &lt;img class=\"image\" src=\"javve.jpg\" />\n &lt;/li>\n&lt;/ul>\n\nvar valueNames =  [\n  'name',\n  'born',\n  { data: ['id'] },\n  { name: 'timestamp', attr: 'data-timestamp' },\n  { name: 'link', attr: 'href' },\n  { name: 'image', attr: 'src' }\n];</code></pre>\n\n</li>\n<li>\n<p><strong><a name=\"item\" href=\"#item\" class=\"anchor\"></a>item</strong> <em class=\"docs-parameter-description\">String, default: undefined</em><br>\nID to item template element or a string of HTML. Can also be a function which receives a <code>values</code> object and which must return the complete item's HTML as a string.</p>\n\n<pre><code class=\"javascript\">var options = {\n    item: \"&lt;li&gt;&lt;span class='name'&gt;&lt;/span&gt;&lt;span class='city'&gt;&lt;/span&gt;&lt;/li&gt;\"\n}\n// or\nvar options = {\n    item: 'cool-item-id'\n};\n// or\nvar options = {\n    item: function(values) {\n      return `&lt;li&gt;&lt;span class='name'&gt;${values.name}&lt;/span&gt;&lt;span class='city'&gt;${values.city}&lt;/span&gt;&lt;/li&gt;`;\n    }\n};\n</code></pre>\n</li>\n<li><p><strong><a name=\"listClass\" href=\"#listClass\" class=\"anchor\"></a>listClass</strong> <em class=\"docs-parameter-description\">String, default: \"list\"</em><br>\nWhat is the class of the list-container?</p></li>\n<li><p><strong><a name=\"searchClass\" href=\"#searchClass\" class=\"anchor\"></a>searchClass</strong> <em class=\"docs-parameter-description\">String, default: \"search\"</em><br>\nWhat is the class of the search field?</p></li>\n<li><p><strong><a name=\"searchColumns\" href=\"#searchColumns\" class=\"anchor\"></a>searchColumns</strong> <em class=\"docs-parameter-description\">Array of strings, default: undefined</em><br>\nRestrict searching to just these column names? Default is to search all columns.</p></li>\n<li><p><strong><a name=\"searchDelay\" href=\"#searchDelay\" class=\"anchor\"></a>searchDelay</strong> <em class=\"docs-parameter-description\">Int default: 0</em><br>\nDelay in milliseconds after last keypress in search field before search starts. 250&rarr;750 is good for very large lists.</p></li>\n<li><p><strong><a name=\"sortClass\" href=\"#sortClass\" class=\"anchor\"></a>sortClass</strong> <em class=\"docs-parameter-description\">String, default: \"sort\"</em><br>\nWhat is the class of the sort buttons?</p></li>\n<li><p><strong><a name=\"indexAsync\" href=\"#indexAsync\" class=\"anchor\"></a>indexAsync</strong> <em class=\"docs-parameter-description\">Boolean, default: false</em><br>\nIf there are already items in the list to which the\nList.js-script is added, then should the indexing be done\nin a asynchronous way? Good for large lists (&gt; 500 items).</p></li>\n<li><p><strong><a name=\"page\" href=\"#page\" class=\"anchor\"></a>page</strong> <em class=\"docs-parameter-description\">Int, default: 200</em><br>\nDefines how many items that should be visible at the same time. This affects\nperformance.</p></li>\n<li><p><strong><a name=\"i\" href=\"#i\" class=\"anchor\"></a>i</strong>  <em class=\"docs-parameter-description\">Int, default: 1</em><br>\nWhich item should be shown as the first one.</p></li>\n<li><p><strong><a name=\"pagination\" href=\"#pagination\" class=\"anchor\"></a>pagination</strong>  <em class=\"docs-parameter-description\">Boolean, default: undefined</em><br>\nRead more <a href=\"{{ \"/docs/pagination\" | relative_url }}\">here</a>.</p></li>\n</ul>\n</li>\n<li><p><strong><a name=\"values\" href=\"#values\" class=\"anchor\"></a>values</strong> <em class=\"docs-parameter-description\">Array of objects, default: undefined</em><br>\nValues to add to the list on initialization.</p></li>\n</ul>\n\n\n<h3><a name=\"properties\" class=\"anchor\" href=\"#properties\"></a>Properties</h3>\n\n<ul>\n  <li>\n    <p>\n      <strong>listContainer <a name=\"listContainer\" class=\"anchor\" href=\"#listContainer\"></a></strong>\n      <em class=\"docs-parameter-description\">Element</em><br>\n      The element node that contains the entire list area.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong>list <a name=\"list\" class=\"anchor\" href=\"#list\"></a></strong>\n      <em class=\"docs-parameter-description\">Element</em><br>\n      The element containing all items.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong>items <a name=\"items\" class=\"anchor\" href=\"#items\"></a></strong>\n      <em class=\"docs-parameter-description\">Array</em><br>\n      An Array of all Item-objects in the list.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong>visibleItems <a name=\"visibleItems\" class=\"anchor\" href=\"#visibleItems\"></a></strong>\n      <em class=\"docs-parameter-description\">Array</em><br>\n      The currently visible items in the list\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong>matchingItems <a name=\"matchingItems\" class=\"anchor\" href=\"#matchingItems\"></a></strong>\n      <em class=\"docs-parameter-description\">Array</em><br>\n      The items matching the currently active filter and search.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong>searched <a name=\"searched\" class=\"anchor\" href=\"#searched\"></a></strong>\n      <em class=\"docs-parameter-description\">Boolean</em><br>\n      Returns true if the list is searched.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong>filtered <a name=\"filtered\" class=\"anchor\" href=\"#filtered\"></a></strong>\n      <em class=\"docs-parameter-description\">Boolean</em><br>\n      Returns true if there is an active filter.\n    </p>\n  </li>\n</ul>\n\n<h3><a name=\"methods\" class=\"anchor\" href=\"#methods\"></a>Methods</h3>\n\n<ul>\n  <li>\n    <p><strong><a name=\"add\" class=\"achor\" href=\"#add\"></a>add(values, callback)</strong><br>\n    Adds one or more items to the list.</p>\n\n<pre><code class=\"javascript\">listObj.add({ name: \"Jonny\", city: \"Stockholm\" });\n\nlistObj.add([\n{ name: \"Gustaf\", city: \"Sundsvall\" }\n, { name: \"Jonas\", city: \"Berlin\" }\n]);</code></pre>\n\n    <p>If <code>callback</code> is set then items are added to the list in a asynchronous way, and the\n    callback is called when all items are added. This is especially useful\n    when adding very many items (200+ or something), or if you just like the\n    asynchronous coding style.</p>\n\n<pre><code class=\"javascript\">listObj.add(arrayWithManyManyItems, function(items) {\nconsole.log('All ' + items.length + ' were added!');\n});</code></pre>\n  </li>\n  <li>\n    <p><strong><a name=\"remove\" class=\"achor\" href=\"#remove\"></a>remove(valueName, value)</strong><br>\n    Removes items from the list where the value named <code>valueName</code> has value <code>value</code>.\n    Returns the number of items that where removed.</p>\n\n<pre><code class=\"javascript\">itemsInList = [\n{ id: 1, name: \"Jonny\" }\n, { id: 2, name \"Gustaf\" }\n];\nlistObj.remove(\"id\", 1); // return 1</code></pre>\n  </li>\n  <li>\n    <p><strong><a name=\"get\" class=\"achor\" href=\"#get\"></a>get(valueName, value)</strong><br>\n    Returns values from the list where the value named <code>valueName</code> has value <code>value</code>.</p>\n\n<pre><code class=\"javascript\">itemsInList = [\n{ id: 1, name: \"Jonny\" }\n, { id: 2, name \"Gustaf\" }\n];\nlistObj.get(\"id\", 2); // return { id: 2, name \"Gustaf\" }</code></pre>\n  </li>\n  <li>\n    <p><strong><a name=\"sort\" class=\"achor\" href=\"#sort\"></a>sort(valueName, {<br/>\n      &nbsp;&nbsp;order: 'desc',<br/>\n      &nbsp;&nbsp;alphabet: undefined,<br/>\n      &nbsp;&nbsp;insensitive: true,<br/>\n      &nbsp;&nbsp;sortFunction: undefined<br/>\n    })</strong><br>\n    Sorts the list based on values the in the column named <code>valueName</code>.\n    The <code>alphabet</code> option is used when you have non-english alphabet\n    where which JavaScript don't know how to sort some characters by default.</p>\n    <p>The default sort function is found here\n    <a href=\"https://github.com/nwoltman/string-natural-compare\">https://github.com/nwoltman/string-natural-compare</a>,\n    if you want to use your own, <a href=\"https://github.com/javve/list.js/blob/master/src/sort.js\">read the code</a> and\n    <a href=\"https://github.com/javve/list.js/blob/master/test/test.sort.js\">check out the tests</a>.</p>\n\n<pre><code class=\"javascript\">listObj.sort('name', { order: \"asc\" }); // Sorts the list in abc-order based on names\nlistObj.sort('name', { order: \"desc\" }); // Sorts the list in zxy-order based on names\n\n// Sort swedish characters correcly, case-insensitive.\nlistObj.sort('name', { alphabet: \"ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö\" });\n\n// Sort swedish characters correcly, case-sensitive.\nlistObj.sort('name', { alphabet: \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö\" });\n\n// Alphabet could also be on the actual listObj via\nlistObj.alphabet = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö\";\n</code></pre>\n\n  </li>\n  <li>\n    <p><strong><a name=\"search\" class=\"achor\" href=\"#search\"></a>search(searchString, columns, searchFunction)</strong><br>\n      Searches the list</p>\n\n<pre><code class=\"javascript\">itemsInList = [\n{ id: 1, name: \"Jonny Stromberg\", born: 1986 }\n, { id: 2, name \"Jonas Arnklint\", born: 1985 }\n, { id: 3, name \"Martina Elm\", born: 1986 }\n, { id: 4, name \"Gustaf Lindqvist\", born: 1983 }\n, { id: 5, name \"Jonny Strandberg\", born: 1990 }\n];\n\nlistObj.search('Jonny'); // Only items with name Jonny are shown (also returns these items)\n\nlistObj.search(); // Show all items in list\n\nlistObj.search('Jonny', ['name']); // Only search in the 'name' column</code></pre>\n\n<p>Space-separated words match in any order using logical AND. Surround a phrase in quotes for exact matches:</p>\n\n<pre><code class=\"javascript\">listObj.search('Jon 198'); // Items that match Jon AND 198\n\nlistObj.search('\"Jonny S\" 1990'); // Items that match \"Jonny S\" AND 1990</code></pre>\n\n<p>Optionally your own search function can be used:</p>\n\n<pre><code class=\"javascript\">listObj.search('Jonny', searchFunction); // Custom search for Jonny\n\nlistObj.search('Jonny', ['name'], searchFunction); // Custom search in the 'name' column\n\nfunction searchFunction(searchString, columns) {\n  for (var k = 0, kl = listObj.items.length; k &lt; kl; k++) {\n     listObj.items[k].found = false;\n     // Insert your custom search logic here, set found = true\n\n  }\n};</code></pre>\n\n  </li>\n  <li>\n    <p><strong><a name=\"clear\" class=\"achor\" href=\"#clear\"></a>clear()</strong><br>\n    Removes all items from the list</p>\n  </li>\n  <li>\n    <p><strong><a name=\"filter\" class=\"achor\" href=\"#filter\"></a>filter(filterFunction)</strong></p>\n\n<pre><code class=\"javascript\">itemsInList = [\n{ id: 1, name: \"Jonny\" }\n, { id: 2, name \"Gustaf\" }\n, { id: 3, name \"Jonas\" }\n];\n\nlistObj.filter(function(item) {\nif (item.values().id > 1) {\n   return true;\n} else {\n   return false;\n}\n}); // Only items with id > 1 are shown in list\n\nlistObj.filter(); // Remove all filters</code></pre>\n\n  </li>\n  <li>\n    <p><strong><a name=\"size\" class=\"achor\" href=\"#size\"></a>size()</strong><br>\n    Returns the size of the list.</p>\n  </li>\n  <li>\n    <p><strong><a name=\"show\" class=\"achor\" href=\"#show\"></a>show(i, page)</strong><br>\n    Shows <code>page</code> number of items from <code>i</code>. Use for paging etc.</p>\n\n<pre><code class=\"javascript\">itemsInList = [\n{ id: 1, name: \"Jonny\" }\n, { id: 2, name \"Gustaf\" }\n, { id: 3, name \"Jonas\" }\n, { id: 4, name \"Egon\" }\n, { id: 5, name \"Frank\" }\n, { id: 6, name \"Ester\" }\n];\n\nlistObj.show(4, 3); // Display item 4,5,6 </code></pre>\n\n  </li>\n  <li>\n    <p><strong><a name=\"update\" class=\"achor\" href=\"#update\"></a>update()</strong><br>\n    Updates the current state of the list. Meaning that if you for instance\n    hides some items with the <code>itemObj.hide()</code> method then you have to call <code>listObj.update()</code>\n    if you want the paging to update.</p>\n  </li>\n  <li>\n    <p><strong><a name=\"reindex\" class=\"achor\" href=\"#reindex\"></a>reIndex()</strong><br>\n    Re-index list from HTML. Good to use if the HTML has been changed by something\n    else than List.js.</p>\n  </li>\n  <li>\n    <p><strong><a name=\"fuzzySearch\" class=\"achor\" href=\"#fuzzySearch\"></a>fuzzySearch()</strong><br>\n    Read more <a href=\"{{ \"/docs/fuzzysearch\" | relative_url }}\">here</a></p>\n  </li>\n  <li>\n    <p><strong><a name=\"on\" class=\"achor\" href=\"#on\"></a>on(event, callback)</strong><br>\n    Execute <code>callback</code> when list have been updated (triggered by <code>update()</code>, which is used by a lot of methods). Use <code>updated</code> as the event.</p>\n    <h4>Avaliable events</h4>\n    <ul>\n      <li>updated</li>\n      <li>searchStart</li>\n      <li>searchComplete</li>\n      <li>filterStart</li>\n      <li>filterComplete</li>\n      <li>sortStart</li>\n      <li>sortComplete</li>\n    </ul>\n  </li>\n</ul>\n"
  },
  {
    "path": "docs/assets/css/style.scss",
    "content": "---\n# Only the main Sass file needs front matter (the dashes are enough)\n---\n\n$blue: #28a8e0;\n$green: #6cd25e;\n$grey: #555;\n$orange: #f59621;\n$lightGrey: #edf4f4;\n$black: #2e2e2e;\n\n$menuWidth: 250px;\n\n\n@import \"normalize\";\n@import \"mixins\";\n@import \"vendor/highlight/xcode\";\n@import \"carbonads\";\n@import \"menu\";\n@import \"docs\";\n\n/* * * * * * * * * * * * * * * * * * * * *\n* General\n* * * * * * * * * * * * * * * * * * * * */\nhtml {\n  font-size: 62.5%;\n}\n\nbody {\n  background-color:#fff;\n  font-size:16px;\n  font:400 1.6rem/1.4 'source sans pro', 'helvetica neue', helvetica, arial;\n  color:$grey;\n  padding:0; //80px 0 150px;\n}\n\na {\n  color:$blue;\n  &:hover {\n    color:darken($blue, 10%);\n  }\n}\np {\n  font-size: 16px;\n  font-size:1.6rem;\n  line-height:1.3;\n  strong, b {\n    color:darken($grey, 20%);\n    font-weight: 500;\n  }\n}\nh1 {\n  font-size: 50px;\n  font-size: 5rem;\n  color:$orange;\n  font-weight:400;\n  margin:0 0 30px;\n}\nh2 {\n  font-size: 30px;\n  font-size:3rem;\n  color:$black;\n  font-weight:400;\n}\nh3 {\n  font-weight:600;\n  font-size:2rem;\n  margin-bottom:10px;\n  color:$black;\n}\nh4 {\n  font-weight:600;\n  font-size: 16px;\n  font-size:1.6rem;\n  margin-bottom:10px;\n  color:$black;\n}\n\n.btn {\n  font-size: 18px;\n  font-size: 1.8rem;\n  padding:8px 30px;\n  border-radius: 6px;\n  border:solid 2px $blue;\n  display:inline-block;\n  color:$blue;\n  text-decoration: none;\n\n  &.btn-primary {\n    border-color:$blue;\n    background-color: $blue;\n    color:#fff;\n    font-weight: 500;\n    &:hover {\n      background-color: darken($blue, 10%);\n      color:#eee;\n    }\n  }\n}\n.btn:hover {\n  text-decoration: none;\n  color:darken($blue, 10%);\n  border-color:darken($blue, 10%);\n}\n.donate-form {\n  display:inline-block;\n  margin-left:5px;\n}\n.donate {\n  border:none;\n  background:none;\n  padding:0;\n  margin:0 10px 0 0;\n  float:left;\n  span {\n    // #gradient > .vertical(#fafafa, #eaeaea);\n    border: 1px solid #b7b7b7;\n    border-bottom-color: #888;\n    display:block;\n    padding: 2px 5px 2px 4px;\n    color: #111;\n    text-decoration: none;\n    text-shadow: 0 1px 0 #fff;\n    white-space: nowrap;\n    cursor: pointer;\n    border-radius: 3px;\n    font: bold 11px/14px \"Helvetica Neue\",Helvetica,Arial,sans-serif;\n    padding-left:20px;\n    position:relative;\n    &:hover {\n      color:#fff;\n      text-decoration: none;\n      background-color:$blue;\n      text-shadow: 0 1px 0 darken($blue, 20%);\n      background-image:none;\n      border-color:darken($blue, 10%);\n    }\n    &:before {\n      content:\" \";\n      display: block;\n      background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjMyOUYyMjMyNTAzNDExRTM4RjkxRjY4OERCMDI3N0ZEIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjMyOUYyMjMzNTAzNDExRTM4RjkxRjY4OERCMDI3N0ZEIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzI5RjIyMzA1MDM0MTFFMzhGOTFGNjg4REIwMjc3RkQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzI5RjIyMzE1MDM0MTFFMzhGOTFGNjg4REIwMjc3RkQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6BnPLgAAAENklEQVR42tRVTUxjVRT+3usr7WtLy//wV0YIIFBLJwYNkChOnGCMCZMYEo2uTMRodKFxdi5cqUwMKxdG3ao4sxuTyWAwJIoybQBxhkmGQAoMM/xJSynQn9f29fndpyXMj8bNLDzJyXt9997vnvOd75xKhmHgYZiMh2TKvR80TauOx+PuWCxWmclkLJIk5elWukpbLS8vX3Y6nZLFYkn9J+Ctra1HQ6HQe0tLSy+n05rHZrfDoapQHQ5YrVbIkgRJlpDP5zN2m22+qanpemtr65jL5brM44l7gSXBcTAYfH109LuvVKcLrS0tKCku5kIOei6FXCYBxWKF010Kt6cMqsuNREpDOBzmehb9/f3nvF7vyH3Aa2trJz45f36rvs4Lh5zByo0gbi0vIBb5A6mshlwuL7bBYpGh2uyoqj2J9s4n0P3M89AMBalkQvf7/V8uLi4u2Gy2+q6uri9qamrWpWAo9NTFCxd/jqzewOK1n2Dk09AJlaNYstm7q0w2TLfSVacHz734GvxPnsby8rK5J5Vihrnc7aGhoReUvJ5HW2sTLvxyGdE4QY2/DjNI6Lr5+Du3Y+/cY0nGMRsK4sTJdtR7vR+fHRj4TNf1V4aHh0fm5uYSCjnOO1wefPr51/j+0iVM/HAFG2thxON7BDIgGyYODAEsW1BWVomGphY8ffoMfIEAZmd/g+8xf5gFztO/kWV5JJvNHiqVlRWYn78Om13Fu++fw1tvv4M7t29hZWUVWlrD4T4vkGS43B4U2YrAQsGuOnBwcIjV1RVmleNlvA2IRiKRwObmJnp7e8sV6lJUB3t7e6A+4XIVo8PnR+epxykx2cybEiPfWSQSScRiu9jd3eX7ockpQdHY2HiHmZeNj4+fKaaiOjs70woXbtI/2tnZ+aC0tJTRSWYUQrtsAgg5siBgsyCZTJouLiGf5tPn84kLuiYmJl6amZl5dnBwcKCqqmrT1PHCwoI0PT291tzcXF9SUgI7m6OoqOgIWACwI80IC+AHBwdgMGhrawtTFdsbGxuRnp6eN/v6+jaPGkTY2NiYO51OX6muru51sNsURTkCFtEJYOHcQxoSJh288GpFRcWHHo8nzaCm6+rqNGZs3NXSHR0d6cnJyeT6+rrJG8UOVvgIuECHiDoajWJ/fx/t7e3XyOePTF0EYSWMo9De0vGxydY+Rb/KaO2MxKSkAC6iFZFub2+bVLDbRgOBwKsClBnaeUbl3t0HTrfu7u7fOdW6WIRfOYw84psoolCFoEA4h44A/bahoeENqkgmIPHkDD113xASxjRlFsyU3tTUlEpgC+eIypQbSMUjXNNra2unOdWi1LLMSA23281BZ9MInnzgdCsYAWzkSiv8ZrUlMZO5Ryef5kY2gRjMQjViJnOampb9V+DjxkvMNbpdzH9RbboAEsM/W6j+P5n0v/vP+1OAAQAqLhyT7hjz3gAAAABJRU5ErkJggg==);\n\n      background-repeat: no-repeat;\n      background-size: 14px;\n      width:14px;\n      height:14px;\n      z-index: 1;\n      position: absolute;\n      left:3px;\n      top:3px;\n    }\n  }\n}\n.donate-pixel {\n  position: absolute;\n}\n\ntable {\n  border-collapse:collapse;\n  width:100%;\n  margin-bottom:10px;\n}\nth {\n  background-color:rgba(0,0,0,.1);\n  border:solid 1px rgba(255,255,255,.1);\n  padding:10px 10px;\n  text-align:left;\n  font-weight: bold;\n  color:#ddd\n}\ntd {\n  padding:10px 10px;\n  border:solid 1px rgba(255,255,255,.1);\n}\n\n\n.example-header {\n  margin-bottom:15px;\n  h1 {\n    margin-bottom:0;\n  }\n  p {\n    margin-top:10px;\n  }\n}\n\n.continue {\n  margin-top: 30px;\n  border-top: solid 1px #eee;\n  padding-top: 15px;\n  text-align: right;\n  font-weight: bold;\n  color: #222;\n}\n\n.footer {\n  //position: fixed;\n  //bottom:0;\n  clear:both;\n  width:100%;\n  height:20px;\n  padding:20px 0;\n  background-color:#111;\n  text-align: center;\n  a {\n    color:#fff;\n    &:hover {\n      color:$lightGrey;\n    }\n  }\n  .misc-share-button {\n    display: inline-block;\n    height: 20px;\n    overflow: hidden;\n  }\n  .tweet {\n    width:100px;\n  }\n  .facebook {\n    width:90px;\n    .fb_iframe_widget span {\n      vertical-align: top !important;\n    }\n  }\n}\n\n/* * * * * * * * * * * * * * * * * * * * *\n* Start page\n* * * * * * * * * * * * * * * * * * * * */\n\n.intro {\n  @extend %clearfix;\n  margin:0 auto;\n  max-width: 900px;\n  padding:80px;\n  box-sizing: border-box;\n  .intro-logo {\n    text-align: center;\n    img {\n      max-width: 80%;\n    }\n    float: left;\n    width:30%;\n  }\n  .intro-text {\n    float: left;\n    width:70%;\n    h1 {\n      font-size: 72px;\n      font-size: 7.2rem;\n      margin: 0 0 1px;\n      small {\n        font-size: 30px;\n        font-size: 3rem;\n        color:lighten($grey, 20%);\n      }\n    }\n    h2 {\n      font-size: 25px;\n      font-size: 2.5rem;\n      font-weight: 300;\n      margin: 0 0 25px;\n      color:lighten($grey, 20%);\n      a {\n        font-weight: 500;\n      }\n      em {\n        color:darken($grey, 20%);\n      }\n    }\n    .btn {\n      margin-right:10px;\n    }\n  }\n}\n\n.misc {\n  @extend %clearfix;\n  clear:both;\n  background-color:$lightGrey;\n  padding:30px;\n  margin:30px -30px;\n  color:#333;\n  h3 {\n    margin:0 0 5px;\n  }\n  .misc-share {\n    margin-bottom:5px;\n  }\n  .misc-author {\n    .misc-author-pic {\n      float:left;\n      margin-right:20px;\n      border-radius: 5px;\n    }\n    h4 {\n      margin-top:0;\n      margin-bottom: 4px;\n    }\n    p {\n      font-size: 14px;\n      font-size:1.4rem;\n      color:lighten($black, 10%);\n      margin-top:0;\n      margin-bottom: 10px;\n    }\n  }\n}\n// .loaded .misc-carbon:before &  {\n//   content:\"Everytime you hide an ad... An open source developer goes to go to bed instead of buying a coffee :'(\\A <--- Cheat? Donate! :D\";\n//   white-space: pre-wrap;\n//   width:260px;\n//   display: block;\n//   text-align: center;\n//   left:20px;\n//   top:20px;\n//   position: relative;\n//   font-size: 12px;\n//   font-size:1.2rem;\n//   font-family: monaco, monospace;\n// }\n\n.startpage-quotes {\n  @extend %clearfix;\n  padding:60px 0;\n  .startpage-quotes-quote {\n    width:33%;\n    float:left;\n    padding: 0 10px;\n    box-sizing: border-box;\n  }\n}\n.startpage-more-examples {\n  clear:both;\n  ul {\n    padding:0 !important;\n    margin:0;\n  }\n  li {\n    display:inline-block;\n    margin-right:15px;\n  }\n}\n\n.startpage-examples {\n  .startpage-example {\n    @extend %clearfix;\n    display:none;\n    &.active {\n      display: block;\n    }\n  }\n}\n\n.annotated-examples {\n  h3 {\n    margin-top:50px;\n  }\n}\n.columns {\n  overflow: hidden;\n  padding:0;\n  margin:0 -30px 5px;\n  display: -webkit-flex;\n  display: -ms-flexbox;\n  display: flex;\n  overflow: hidden;\n\n  .column {\n    padding:20px 30px;\n    flex: 1;\n    background-color: $lightGrey;\n    &:last-child {\n      background-color: darken($lightGrey, 2%);\n    }\n    pre {\n      background-color: transparent;\n      margin:0;\n      padding:0;\n    }\n  }\n}\n\n.annotated-list {\n  box-sizing: border-box;\n  @extend %clearfix;\n  .list {\n    padding-top:20px;\n    & > div {\n      padding:10px 0;\n      border-top:solid 1px rgba(255,255,255,.1);\n    }\n  }\n  .avatar {\n    max-width: 150px;\n    img {\n      max-width: 100%;\n    }\n  }\n  h3 {\n    font-size:16px;\n    font-size: 1.6rem;\n    margin:0 0 3px;\n    font-weight: bold;\n    //color:#fff;\n  }\n  p {\n    margin:0;\n    //color:#eee;\n  }\n\n  input {\n    border-radius: 25px;\n    padding:7px 14px;\n    background-color: transparent;\n    border:solid 1px rgba(0,0,0,.2);\n    width:200px;\n    box-sizing: border-box;\n    color:$black;\n    margin-bottom:5px;\n  }\n  input:focus {\n    outline:none;\n    border-color:#aaa;\n  }\n  .sort {\n    font-size:12px;\n    font-size: 1.2rem;\n    padding:5px 15px;\n    border-radius: 25px;\n    border:none;\n    display:inline-block;\n    color:$black;\n    text-decoration: none;\n    background-color: rgba(0,0,0,.05);\n    margin:2px 0;\n  }\n  .sort:hover {\n    text-decoration: none;\n    background-color: rgba(0,0,0,.1);\n  }\n  .sort:focus {\n    outline:none;\n  }\n  .sort:after {\n    width: 0;\n    height: 0;\n    border-left: 4px solid transparent;\n    border-right: 4px solid transparent;\n    border-bottom: 4px solid transparent;\n    content:\"\";\n    position: relative;\n    top:-10px;\n    right:-4px;\n  }\n  .sort.asc:after {\n    width: 0;\n    height: 0;\n    border-left: 4px solid transparent;\n    border-right: 4px solid transparent;\n    border-top: 4px solid $black;\n    content:\"\";\n    position: relative;\n    top:11px;\n    right:-4px;\n  }\n  .sort.desc:after {\n    width: 0;\n    height: 0;\n    border-left: 4px solid transparent;\n    border-right: 4px solid transparent;\n    border-bottom: 4px solid $black;\n    content:\"\";\n    position: relative;\n    top:-9px;\n    right:-4px;\n  }\n}\n\n/* * * * * * * * * * * * * * * * * * * * *\n* Examples\n* * * * * * * * * * * * * * * * * * * * */\n.nav-tabs {\n  .active a {\n    background-color: $lightGrey !important;\n  }\n}\n\n\n\n/* * * * * * * * * * * * * * * * * * * * *\n* Paging\n* * * * * * * * * * * * * * * * * * * * */\n.paging {\n  padding-bottom:10px;\n  clear:both;\n  float:left;\n}\n.paging li {\n  display:block;\n  float:left;\n  padding:10px 15px;\n  border-radius:50%;\n}\n.paging li a {\n  color:#999;\n  text-decoration:none;\n  display:inline-block;\n  line-height:14px;\n}\n.paging li.active a {\n  font-weight:bold;\n  color:#eee;\n  font-size:18px;\n  margin:-1px;\n}\n.paging li a:hover {\n  color:#eee;\n}\n\ncode {\n  background-color: $lightGrey;\n  border: solid 1px darken($lightGrey, 5%);\n  border-radius: 5px;\n  padding: 1px 4px;\n}\npre {\n  padding:30px;\n  margin:0;\n  line-height:1.7;\n  color:#666;\n}\npre code {\n  padding:0;\n  border:none;\n  background-color: transparent;\n  border-radius: 0;\n}\n\npre, code {\n   font-family: monospace, 'monaco', sans-serif;\n   font-size: 12px;\n   font-size: 1.2rem;\n}\npre code .annotation {\n  background-color: $orange;\n  color: #fff;\n  padding: 2px 6px;\n  border-radius: 11px;\n  cursor:help;\n  &:hover {\n    background-color:darken($orange, 10%);\n  }\n}\n"
  },
  {
    "path": "docs/assets/javascripts/main.js",
    "content": "---\n---\n\n{% include javascripts/vendor/jquery-1.8.3.min.js %}\n{% include javascripts/vendor/highlight.pack.js %}\n\nhljs.initHighlightingOnLoad();\n\n\n$(window).load(function() { $('body').addClass('loaded'); });\n\n\nvar options = {\n    valueNames: [ 'name', 'born' ]\n};\nvar userList = new List('users', options);\n"
  },
  {
    "path": "docs/docs/fuzzysearch.html",
    "content": "---\nlayout: default\ntitle: Fuzzy search plugin\n---\n\n<h2>Fuzzy search</h2>\n\n<p><i>\n  Note: The fuzzy search plugin is\n  deprecated since v1.5.0, it's now bundled into List.js. Read the\n  <a href=\"/docs/plugins/fuzzysearch\">old docs here</a>.\n</i></p>\n\n<h3>The difference between Fuzzy Search and List.js default search</h3>\n\n<p>The default search will conduct a time efficient search for an exact match in the content searched, while the fuzzy search will render results depending on if they are included anywhere in the content.</p>\n\n<h3>Basic example</h3>\n<pre><code>var items = [\n    { character: \"Guybrush Threepwood\", game: \"The Secret of Monkey Island\" },\n    { character: \"Manny Calavera\", game: \"Grim Fandango\" },\n    { character: \"Bernard Bernoulli\", game: \"Maniac Mansion\" }\n];\n\nlist.search('gu thre'); // return none\nlist.fuzzySearch('gu thre') // return 1 item\n</code></pre>\n\n\n<h3>Options</h3>\n<p>All options are optional. Simplest implementation is:</p>\n<pre><code class=\"javascript\">new List(id, { fuzzySearch: options });</code></pre>\n<ul>\n  <li>\n    <strong>searchClass</strong> <em class=\"docs-parameter-description\">String, default: fuzzy-search</em><br/>\n    What is the class of the search field?\n  </li>\n  <li>\n    <strong>location</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n    Approximately where in the text is the pattern expected to be found?\n  </li>\n  <li>\n    <strong>distance</strong> <em class=\"docs-parameter-description\">Int, default: 100</em><br/>\n    Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is ‘distance’ characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified, a threshold of 1000 would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  </li>\n  <li>\n    <strong>threshold</strong> <em class=\"docs-parameter-description\">Int, default: 0.4</em><br/>\n    At what point does the match algorithm give up. A threshold of <code>0.0</code> requires a perfect match (of both letters and location), a threshold of <code>1.0</code> would match anything.\n  </li>\n  <li>\n    <strong>multiSearch</strong> <em class=\"docs-parameter-description\">Boolean, default: true</em><br/>\n    Subtract arguments from the <code>searchString</code> or put <code>searchString</code> as only argument\n  </li>\n</ul>\n\n<h3>Implementation</h3>\n<pre><code>&lt;div id=\"list-id\">\n  &lt;input class=\"fuzzy-search\" />\n  &lt;ul class=\"list\">\n    / A bunch of items /\n  &lt;/ul>\n&lt;/div>\n\n&lt;script>\n\nvar options = {\n  valueNames: [ 'name', 'category' ],\n  fuzzySearch: {\n    searchClass: \"fuzzy-search\",\n    location: 0,\n    distance: 100,\n    threshold: 0.4,\n    multiSearch: true\n  }\n};\n\nvar listObj = new List('list-id', options);\n\n// Search manually\nlistObj.fuzzySearch('my search');\n\n// Search manually on specific columns\nlistObj.fuzzySearch('my search', [ 'name' ]);\n\n&lt;/script>\n</code></pre>\n\n<p>A big thanks to <a href=\"https://github.com/LuukvE\">LuukvE</a> who made a <a href=\"https://github.com/LuukvE/list/commit/a75b6ef5649c5fb4232a40ef2f5191d0b57e1ede\">commit</a> from which I could create this Fuzzy Search plugin.</p>\n\n<div class=\"continue\">Next topic: <a href=\"/docs/plugins/build\">Build your own plugin ›</a></div>\n"
  },
  {
    "path": "docs/docs/index.html",
    "content": "---\nlayout: default\ntitle: Really simple example\n---\n\n<h2>Really simple examples</h2>\n<p>You can use List.js on either existing HTML or create new with super simple templating.</p>\n\n\n<h3>Example 1: Using existing list</h3>\n<h5>HTML</h5>\n\n<pre><code>&lt;div id=\"hacker-list\">\n  &lt;ul class=\"list\">\n    &lt;li>\n       &lt;h3 class=\"name\">Jonny&lt;/h3>\n       &lt;p class=\"city\">Stockholm&lt;/p>\n    &lt;/li>\n    &lt;li>\n      &lt;h3 class=\"name\">Jonas&lt;/h3>\n      &lt;p class=\"city\">Berlin&lt;/p>\n    &lt;/li>\n  &lt;/ul>\n&lt;/div></code></pre>\n\n    <h5>JavaScript</h5>\n<pre><code>var options = {\n    valueNames: [ 'name', 'city' ]\n};\n\nvar hackerList = new List('hacker-list', options);</code></pre>\n\n\n    <br /><br /><h3>Example 2: Create list on initialization: Version 1</h3>\n\n    <h5>HTML</h5>\n<pre><code>&lt;div id=\"hacker-list\">\n    &lt;ul class=\"list\">&lt;/ul>\n&lt;/div></code></pre>\n\n<h5>JavaScript</h5>\n<pre><code class=\"javascript\">var options = {\n  valueNames: [ 'name', 'city' ],\n  item: '&lt;li>&lt;h3 class=\"name\">&lt;/h3>&lt;p class=\"city\">&lt;/p>&lt;/li>'\n};\n\nvar values = [\n  { name: 'Jonny', city:'Stockholm' }\n  , { name: 'Jonas', city:'Berlin' }\n];\n\nvar hackerList = new List('hacker-list', options, values);</code></pre>\n\n    <br /><br /><h3>Example 3: Create list on initialization: Version 2</h3>\n\n    <h5>HTML</h5>\n<pre><code>&lt;div id=\"hacker-list\">\n  &lt;ul class=\"list\">&lt;/ul>\n&lt;/div>\n\n&lt;div style=\"display:none;\">\n  &lt;!-- A template element is needed when list is empty, TODO: needs a better solution -->\n  &lt;li id=\"hacker-item\">\n   &lt;h3 class=\"name\">&lt;/h3>\n   &lt;p class=\"city\">&lt;/p>\n  &lt;/li>\n&lt;/div></code></pre>\n\n    <h5>JavaScript</h5>\n<pre><code>var options = {\n    item: 'hacker-item'\n};\n\nvar values = [\n    { name: 'Jonny', city:'Stockholm' }\n    , { name: 'Jonas', city:'Berlin' }\n];\n\nvar hackerList = new List('hacker-list', options, values);</code></pre>\n\n    <br /><br /><h3>Example 4: Index existing list and then add</h3>\n\n    <h5>HTML</h5>\n<pre><code>&lt;div id=\"hacker-list\">\n  &lt;ul class=\"list\">\n   &lt;li>\n     &lt;h3 class=\"name\">Jonny&lt;/h3>\n     &lt;p class=\"city\">Stockholm&lt;/p>\n   &lt;/li>\n  &lt;/ul>\n&lt;/div></code></pre>\n\n    <h5>JavaScript</h5>\n<pre><code>var options = {\n  valueNames: ['name', 'city']\n};\n\nvar hackerList = new List('hacker-list', options);\n\nhackerList.add( { name: 'Jonas', city:'Berlin' } );</code></pre>\n\n    <br /><br /><h3>Example 5: Add automagic search and sort inputs and buttons</h5>\n\n    <h5>HTML</h5>\n<pre><code>&lt;div id=\"hacker-list\">\n\n  &lt;input class=\"search\" />\n  &lt;span class=\"sort\" data-sort=\"name\">Sort by name&lt;/span>\n  &lt;span class=\"sort\" data-sort=\"city\">Sort by city&lt;/span>\n\n  &lt;ul class=\"list\">\n   &lt;li>\n     &lt;h3 class=\"name\">Jonny&lt;/h3>\n     &lt;p class=\"city\">Stockholm&lt;/p>\n   &lt;/li>\n   &lt;li>\n     &lt;h3 class=\"name\">Jonas&lt;/h3>\n     &lt;p class=\"city\">Berlin&lt;/p>\n   &lt;/li>\n  &lt;/ul>\n&lt;/div></code></pre>\n\n    <h5>JavaScript (nothing special)</h5>\n<pre><code>var options = {\n  valueNames: [ 'name', 'city' ]\n};\n\nvar hackerList = new List('hacker-list', options);</code></pre>\n\n<p>Read more <a href=\"{{ \"/docs/search+sort\" | relative_url }}\">here</a></p>\n\n    <br /><br /><h3>Example 6: Using data attributes and other custom attributes (introduced in v1.2.0)<a name=\"example-6\" class=\"anchor\" href=\"#example-6\"></a></h3>\n\n    <h5>HTML</h5>\n<pre><code>&lt;div id=\"hacker-list\">\n  &lt;ul class=\"list\">\n   &lt;li data-id=\"1\">\n     &lt;a href=\"http://javve.com\" class=\"link name\">Jonny&lt;/a>\n     &lt;p class=\"born timestamp\" data-timestamp=\"1234\">1986&lt;/p>\n     &lt;img class=\"image\" src=\"javve.jpg\" />\n   &lt;/li>\n  &lt;/ul>\n&lt;/div></code></pre>\n\n    <h5>JavaScript</h5>\n<pre><code>var options = {\n  valueNames: [\n    'name',\n    'born',\n    { data: ['id'] },\n    { name: 'timestamp', attr: 'data-timestamp' },\n    { name: 'link', attr: 'href' },\n    { name: 'image', attr: 'src' }\n  ]\n};\n\nvar hackerList = new List('hacker-list', options);\n\nhackerList.add({\n  name: 'Jonas',\n  born: '1985',\n  id: 2,\n  timestamp: '1337',\n  link: 'http://arnklint.com'\n  image: 'jonas.gif'\n});</code></pre>\n\n    <div class=\"continue\">Next topic: <a href=\"{{ \"/docs/options\" | relative_url }}\">Options ›</a></div>\n"
  },
  {
    "path": "docs/docs/item-api.html",
    "content": "---\nlayout: default\ntitle: Item API\n---\n\n<h2>\n<a name=\"item-api\" class=\"anchor\" href=\"#item-api\"><span class=\"octicon octicon-link\"></span></a>Item API</h2>\n\n<p>These methods are available for all Items that are returned by\nthe list.</p>\n\n<h3>\n<a name=\"properties-1\" class=\"anchor\" href=\"#properties-1\"><span class=\"octicon octicon-link\"></span></a>Properties</h3>\n\n<ul>\n  <li>\n    <strong><a name=\"elm\" href=\"#elm\" class=\"anchor\"></a>elm</strong>  <em class=\"docs-parameter-description\">Element</em><br />\n    The actual item DOM element\n  </li>\n  <li>\n    <strong><a name=\"_values\" href=\"#_values\" class=\"anchor\"></a>_values</strong> <em class=\"docs-parameter-description\">Array</em><br />\n    Direct access to the item's values. Simplifies debugging. <em><b>Note:</b> Always use item.values() when interacting with the values.</em>\n  </li>\n</ul>\n\n<h3><a name=\"methods-1\" class=\"anchor\" href=\"#methods-1\"><span class=\"octicon octicon-link\"></span></a>Methods</h3>\n\n<ul>\n  <li>\n    <p><strong><a name=\"values\" href=\"#values\" class=\"anchor\"></a>values(newValues)</strong></p>\n    <ul>\n      <li>\n        <p>\n          <strong><a name=\"newValues\" href=\"#newValues\" class=\"anchor\"></a>newValues</strong> <em class=\"docs-parameter-description\">optional</em><br />\n          If variable newValues are present the new values replaces the current item values\n          and updates the list.\n          If newValues are not present, the function returns the current values.\n        </p>\n  <pre><code>item.values() // { name: \"Jonny\", age: 24, city: \"Umeå\" }\n  item.values({\n      age: 25,\n      city: \"Stockholm\"\n  });\n  item.values() // { name: \"Jonny\", age: 25, city: \"Stockholm\" }\n  </code></pre>\n      </li>\n    </ul>\n  </li>\n  <li>\n    <p>\n      <strong><a name=\"show\" href=\"#show\" class=\"anchor\"></a>show()</strong><br>\n      Shows the item\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong><a name=\"hide\" href=\"#hide\" class=\"anchor\"></a>hide()</strong><br>\n      Hides the item (removes the element from the list, and then when its shown it's appended again. The element will thereby change position in the list. A bug, but a good solution is yet to be found.)\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong><a name=\"matching\" href=\"#matching\" class=\"anchor\"></a>matching()</strong> <em class=\"docs-parameter-description\">Boolean</em><br>\n      Returns boolean. True if the item matches the current filter and search. Visible items\n      always matches, but matching items are not always visible.\n  </p>\n</li>\n  <li>\n    <p>\n      <strong><a name=\"visible\" href=\"#visible\" class=\"anchor\"></a>visible()</strong> <em class=\"docs-parameter-description\">Boolean</em><br>\n      Returns boolean. True if the item is visible. Visible items\n    always matches, but matching items are not always visible.\n    </p>\n  </li>\n</ul>\n\n    <div class=\"continue\">Next topic: <a href=\"{{ \"/docs/plugins\" | relative_url }}\">Plugins introduction ›</a></div>\n"
  },
  {
    "path": "docs/docs/pagination.html",
    "content": "---\nlayout: default\ntitle: Pagination\n---\n\n<h2>Pagination</h2>\n\n<p><i>\n  Note: The pagination plugin is\n  deprecated since v1.5.0, it's now bundled into List.js. Read the\n  <a href=\"{{ \"/docs/plugins/pagination\" | relative_url }}\">old docs here</a>.\n</i></p>\n\n<h3>Basic example</h3>\n<pre><code>&lt;div id=\"listId\">\n  &lt;ul class=\"list\">\n      // A bunch of items\n  &lt;/ul>\n  &lt;ul class=\"pagination\">&lt;/ul>\n&lt;/div>\n\n&lt;script>\n  var options = {\n    valueNames: [ 'name', 'category' ],\n    page: 3,\n    pagination: true\n  };\n\n  var listObj = new List('listId', options);\n&lt;/script>\n</code></pre>\n\n\n\n<h3>Options</h3>\n<ul>\n  <li>\n    <strong>paginationClass</strong> <em class=\"docs-parameter-description\">String, default: &ldquo;pagination&rdquo;</em><br/>\n    The class that defines which <code>ul</code> that should contain the pagination (must be inside the list container)\n  </li>\n  <li>\n    <strong>innerWindow</strong> <em class=\"docs-parameter-description\">Int, default: 2</em><br/>\n    How many pages should be visible on each side of the current page.<br/>\n    <code>innerWindow: 2 &hellip; 3 4 <strong>5</strong> 6 7 &hellip;</code><br/>\n    <code>innerWindow: 1 &hellip; 4 <strong>5</strong> 6 &hellip;</code>\n  </li>\n  <li>\n    <strong>outerWindow</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n    How many pages should be visible on from the beginning and from the end of the pagination.<br/>\n    <code>outerWindow: 0 &hellip; 3 4 <strong>5</strong> 6 7&hellip;</code><br/>\n    <code>outerWindow: 2 1 2 &hellip; 4 5 <strong>6</strong> 7 8 &hellip; 11 12</code>\n  </li>\n  <li>\n    <strong>left</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n    Same as <code>outerWindow</code> but only from left.\n    <code>outerWindow: 2</code> and <code>left: 1</code> <code>1 &hellip; 4 5 <strong>6</strong> 7 8 &hellip; 11 12</code>\n  </li>\n  <li>\n    <strong>right</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n    Same as <code>left</code> but from right.\n  </li>\n  <li>\n    <strong>item</strong> <em class=\"docs-parameter-description\">String, default <code>&lt;li>&lt;a class='page' href='#'>&lt;/a>&lt;/li></code></em><br>\n    Template for the pagination items.\n  </li>\n</ul>\n\n<h4>Notice</h4>\n<p>The number of items at each page are decided by the List.js own property <code>page</code>. To set this just add page: Number to the option object sent into the List.js constructor (as been done in both of the examples at this page).</p>\n\n<h3>Generated output</h3>\n\n<pre><code>&lt;div id=\"listId\">\n  &lt;ul class=\"list\">\n      / A bunch of items /\n  &lt;/ul>\n  &lt;ul class=\"pagination\">\n    &lt;li>\n      &lt;a class=\"page active\" href=\"javascript:function Z(){Z=&quot;&quot;}Z()\">1&lt;/a>\n    &lt;/li>\n    &lt;li>\n      &lt;a class=\"page\" href=\"javascript:function Z(){Z=&quot;&quot;}Z()\">2&lt;/a>\n    &lt;/li>\n    &lt;li>\n      …\n    &lt;/li>\n  &lt;/ul>\n&lt;/div>\n</code></pre>\n\n<h3>Double pagination</h3>\n\n<pre><code>&lt;div id=\"listId\">\n  &lt;ul class=\"paginationTop\">&lt;/ul>\n  &lt;ul class=\"list\">\n    // A bunch of items\n  &lt;/ul>\n  &lt;ul class=\"paginationBottom\">&lt;/ul>\n&lt;/div>\n\n&lt;script>\n  var listOptions = {\n    valueNames: [ 'name', 'category' ],\n    page: 3,\n    pagination: [{\n      name: \"paginationTop\",\n      paginationClass: \"paginationTop\",\n      outerWindow: 2\n    }, {\n      paginationClass: \"paginationBottom\",\n      innerWindow: 3,\n      left: 2,\n      right: 4\n    }]\n  };\n\n  var listObj = new List('listId', listOptions);\n&lt;/script></code></pre>\n\n<div class=\"continue\">Next topic: <a href=\"{{ \"/docs/plugins/fuzzysearch\" | relative_url }}\">Fuzzy search plugin ›</a></div>\n"
  },
  {
    "path": "docs/docs/plugins/build.html",
    "content": "---\nlayout: default\ntitle: Build your own plugin\n---\n\n    <h2>Build your own plugin</h2>\n\n    <p>A List.js plugin is basically a function/class which returns a object on initialization.</p>\n\n    <h3>A basic example plugin</h3>\n    <h4>The plugin code <code>list.awesomething.js</code></h4>\n<pre><code>function ListAwesomething() {\n  options = options || {};\n  return {\n    init: function(list) {\n      // This method is called on initialization\n    },\n    name: options.name || \"awesomething\",\n    customMethod: function() {\n      return \"cowabunga\";\n    }\n  };\n};\n</code></pre>\n\n    <h4>Using the plugin</h4>\n<pre><code>&lt;script src=\"list.js\">&lt;/script>\n&lt;script src=\"list.awesomething.js\">&lt;/script>\n&lt;script>\n  var myList = new List('my-list', {\n    plugins: ListAwesomething()\n  });\n\n  myList.awesomething.customMethod(); // cowabunga\n&lt;/script>\n</code></pre>\n    <h3>Requirements / Specifications</h3>\n    <ul>\n      <li>\n        A plugin namned Awesome Thing have to be in a JavaScript file namned <code>list.awesomething.js</code> <em>(no dash, camelcase or anything)</em>\n        and the function/class have to be namned <code>ListAwesomeThing</code> <em>(camelcase but no dash anything else)</em>.\n      </li>\n      <li>The plugin object must contain an <code>init</code> method.</li>\n      <li>The plugin object must contain an <code>name</code> attribute that defaults to the plugin name.</li>\n    </ul>\n\n    <h3>Live example</h3>\n    <p><a href=\"{{ \"/examples/plugin\" | relative_url }}\">Check this out!</a></p>\n\n    <% locals.mediaTempleTerm = \"plugin\" %>\n"
  },
  {
    "path": "docs/docs/plugins/fuzzysearch.html",
    "content": "---\nlayout: default\ntitle: Fuzzy search plugin\n---\n\n    <h2>Fuzzy search plugin</h2>\n\n    <p style=\"padding:20px; background-color:#ffdbdb; border:solid 1px #ffb8b8;\">Note: The fuzzy search plugin is deprecated since v1.5.0, it's now <a href=\"{{ \"/docs/fuzzysearch\" | relative_url }}\">bundled into</a> List.js.</p>\n\n    <p>To use the plugin you first need to download it:</p>\n\n    <h4>Via <a href=\"https://github.com/javve/list.fuzzysearch.js\">GitHub</a></h4>\n    <a href=\"https://raw.githubusercontent.com/javve/list.fuzzysearch.js/v0.1.0/dist/list.fuzzysearch.min.js\" class=\"btn btn-primary\">Download list.fuzzysearch.js</a>\n\n    <h4>Via <a href=\"https://github.com/bower/bower\">Bower</a></h4>\n    <pre><code>bower install list.fuzzysearch.js</code></pre>\n\n    <h4>Via <a href=\"https://cdnjs.com/\">CDNJS</a></h4>\n    <pre><code>&lt;script src=\"//cdnjs.cloudflare.com/ajax/libs/list.fuzzysearch.js/0.1.0/list.fuzzysearch.min.js\">&lt;/script></code></pre>\n\n    <h3>The difference between Fuzzy Search and List.js default search</h3>\n\n    <p>The default search will conduct a time efficient search for an exact match in the content searched, while the fuzzy search will render results depending on if they are included anywhere in the content.</p>\n\n<h3>Basic example</h3>\n<pre><code>var items = [\n    { character: \"Guybrush Threepwood\", game: \"The Secret of Monkey Island\" },\n    { character: \"Manny Calavera\", game: \"Grim Fandango\" },\n    { character: \"Bernard Bernoulli\", game: \"Maniac Mansion\" }\n];\n\nlist.search('gu thre'); // return none\nlist.fuzzySearch.search('gu thre') // return 1 item\n</code></pre>\n\n<h3>Implementation</h3>\n<pre><code>&lt;div id=\"list-id\">\n  &lt;input class=\"fuzzy-search\" />\n  &lt;ul class=\"list\">\n    / A bunch of items /\n  &lt;/ul>\n&lt;/div>\n\n&lt;script>\n\nvar fuzzyOptions = {\n  searchClass: \"fuzzy-search\",\n  location: 0,\n  distance: 100,\n  threshold: 0.4,\n    multiSearch: true\n};\nvar options = {\n  valueNames: [ 'name', 'category' ],\n  plugins: [\n    ListFuzzySearch(fuzzyOptions)\n  ]\n};\n\nvar listObj = new List('list-id', options);\n\n// Search manually\nlistObj.fuzzySearch.search('my search');\n\n// Search manually on specific columns\nlistObj.fuzzySearch.search('my search', { name: true });\n\n&lt;/script>\n</code></pre>\n\n\n\n    <h3>Options</h3>\n    <p>All options are optional. Simplest implementation is:</p>\n    <pre><code class=\"javascript\">plugins: [ ListFuzzySearch() ]</code></pre>\n    <ul>\n      <li>\n        <strong>location</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n        Approximately where in the text is the pattern expected to be found?\n      </li>\n      <li>\n        <strong>distance</strong> <em class=\"docs-parameter-description\">Int, default: 100</em><br/>\n        Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is ‘distance’ characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified, a threshold of 1000 would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n      </li>\n      <li>\n        <strong>threshold</strong> <em class=\"docs-parameter-description\">Int, default: 0.4</em><br/>\n        At what point does the match algorithm give up. A threshold of <code>0.0</code> requires a perfect match (of both letters and location), a threshold of <code>1.0</code> would match anything.\n      </li>\n      <li>\n        <strong>multiSearch</strong> <em class=\"docs-parameter-description\">Boolean, default: true</em><br/>\n        Subtract arguments from the <code>searchString</code> or put <code>searchString</code> as only argument\n      </li>\n    </ul>\n\n    <p>A big thanks to <a href=\"https://github.com/LuukvE\">LuukvE</a> who made a <a href=\"https://github.com/LuukvE/list/commit/a75b6ef5649c5fb4232a40ef2f5191d0b57e1ede\">commit</a> from which I could create this Fuzzy Search plugin.</p>\n\n    <div class=\"continue\">Next topic: <a href=\"{{ \"/docs/plugins/build\" | relative_url }}\">Build your own plugin ›</a></div>\n"
  },
  {
    "path": "docs/docs/plugins/index.html",
    "content": "---\nlayout: default\ntitle: Using Plugins\n---\n\n    <h2>Using plugins</h2>\n\n    <h3>Getting started</h3>\n    <p>To use a plugin you need two things:</p>\n    <ol>\n      <li>Include the plugins .js-file at the page.</li>\n      <li>\n        <p>Include it when you instantiate List.js</p>\n<pre><code>new List('list-id', {\n  plugins: [ ListPagination(), NameOfOtherPlugin(options) ]\n});</code></pre>\n    </ol>\n\n\n    <h3>Naming and accessing plugins</h3>\n    <p>It is also possible to add options and load multiple instances of the same plugins (if the plugin itself allows it).</p>\n    <p>\n      If the property <code>name</code> is added in the plugin <code>option</code> parameter does the plugin become\n      accessible through listObj.namePropertyValue.This is useful when having multiple instances of the same plugin.\n    </p>\n<pre><code>var myList = new List('list-id', {\n  plugins: [\n    ListPagination({ name: \"topPagination\", paginationClass: \"top-pagination\" }),\n    ListPagination({ name: \"bottomPagination\", paginationClass: \"bottom-pagination\" })\n  ]\n});\nconsole.log(myList.topPagination);\nconsole.log(myList.bottomPagination);</code></pre>\n\n    <h3>Build your own plugin</h3>\n    <p>Go to: <a href=\"{{ \"/docs/plugins/build\" | relative_url }}\">/docs/plugins/build</a></p>\n\n    <div class=\"continue\">Next topic: <a href=\"{{ \"/docs/plugins/pagination\" | relative_url }}\">Pagination plugin ›</a></div>\n"
  },
  {
    "path": "docs/docs/plugins/pagination.html",
    "content": "---\nlayout: default\ntitle: Pagination plugin\n---\n\n    <h2>Pagination plugin</h2>\n\n    <p style=\"padding:20px; background-color:#ffdbdb; border:solid 1px #ffb8b8;\">Note: The pagination plugin is deprecated since v1.5.0, it's now <a href=\"/docs/pagination\">bundled into</a> List.js.</p>\n\n    <p>To use the plugin you first need to download it:</p>\n\n    <h4>Via <a href=\"https://github.com/javve/list.pagination.js\">GitHub</a></h4>\n    <a href=\"https://raw.githubusercontent.com/javve/list.pagination.js/v0.1.1/dist/list.pagination.min.js\" class=\"btn btn-primary\">Download List.pagination.js</a>\n\n    <h4>Via <a href=\"https://github.com/bower/bower\">Bower</a></h4>\n    <pre><code>bower install list.pagination.js</code></pre>\n\n    <h4>Via <a href=\"https://cdnjs.com/\">CDNJS</a></h4>\n    <pre><code>&lt;script src=\"//cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js\">&lt;/script></code></pre>\n\n<h3>Basic example</h3>\n<pre><code>&lt;div id=\"listId\">\n  &lt;ul class=\"list\">\n      // A bunch of items\n  &lt;/ul>\n  &lt;ul class=\"pagination\">&lt;/ul>\n&lt;/div>\n\n&lt;script>\n  var options = {\n    valueNames: [ 'name', 'category' ],\n    page: 3,\n    plugins: [\n      ListPagination({})\n    ]\n  };\n\n  var listObj = new List('listId', options);\n&lt;/script>\n</code></pre>\n\n\n\n    <h3>Options</h3>\n    <ul>\n      <li>\n        <strong>name</strong> <em class=\"docs-parameter-description\">String, default: &ldquo;pagination&rdquo;</em><br/>\n        Default option for all plugins. Defines how to access the plugin from the list object <code>listObj.pluginName</code>.\n      </li>\n      <li>\n        <strong>paginationClass</strong> <em class=\"docs-parameter-description\">String, default: &ldquo;pagination&rdquo;</em><br/>\n        The class that defines which <code>ul</code> that should contain the pagination (must be inside the list container)\n      </li>\n      <li>\n        <strong>innerWindow</strong> <em class=\"docs-parameter-description\">Int, default: 2</em><br/>\n        How many pages should be visible on each side of the current page.<br/>\n        <code>innerWindow: 2 &hellip; 3 4 <strong>5</strong> 6 7 &hellip;</code><br/>\n        <code>innerWindow: 1 &hellip; 4 <strong>5</strong> 6 &hellip;</code>\n      </li>\n      <li>\n        <strong>outerWindow</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n        How many pages should be visible on from the beginning and from the end of the pagination.<br/>\n        <code>outerWindow: 0 &hellip; 3 4 <strong>5</strong> 6 7&hellip;</code><br/>\n        <code>outerWindow: 2 1 2 &hellip; 4 5 <strong>6</strong> 7 8 &hellip; 11 12</code>\n      </li>\n      <li>\n        <strong>left</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n        Same as <code>outerWindow</code> but only from left.\n        <code>outerWindow: 2</code> and <code>left: 1</code> <code>1 &hellip; 4 5 <strong>6</strong> 7 8 &hellip; 11 12</code>\n      </li>\n      <li>\n        <strong>right</strong> <em class=\"docs-parameter-description\">Int, default: 0</em><br/>\n        Same as <code>left</code> but from right.\n      </li>\n    </ul>\n\n    <h4>Notice</h4>\n    <p>The number of items at each page are decided by the List.js own property page. To set this just add page: Number to the option object sent into the List.js constructor (as been done in both of the examples at this page).</p>\n\n    <h3>Generated output</h3>\n\n<pre><code>&lt;div id=\"listId\">\n  &lt;ul class=\"list\">\n      / A bunch of items /\n  &lt;/ul>\n  &lt;ul class=\"pagination\">\n    &lt;li>\n      &lt;a class=\"page active\" href=\"javascript:function Z(){Z=&quot;&quot;}Z()\">1&lt;/a>\n    &lt;/li>\n    &lt;li>\n      &lt;a class=\"page\" href=\"javascript:function Z(){Z=&quot;&quot;}Z()\">2&lt;/a>\n    &lt;/li>\n    &lt;li>\n      …\n    &lt;/li>\n  &lt;/ul>\n&lt;/div>\n</code></pre>\n\n    <h3>Double pagination</h3>\n\n<pre><code>&lt;div id=\"listId\">\n  &lt;ul class=\"paginationTop\">&lt;/ul>\n  &lt;ul class=\"list\">\n    // A bunch of items\n  &lt;/ul>\n  &lt;ul class=\"paginationBottom\">&lt;/ul>\n&lt;/div>\n\n&lt;script>\n  var paginationTopOptions = {\n    name: \"paginationTop\",\n    paginationClass: \"paginationTop\",\n    outerWindow: 2\n  };\n  var paginationBottomOptions = {\n    name: \"paginationBottom\",\n    paginationClass: \"paginationBottom\",\n    innerWindow: 3,\n    left: 2,\n    right: 4\n  };\n  var listOptions = {\n    valueNames: [ 'name', 'category' ],\n    page: 3,\n    plugins: [\n        ListPagination(paginationTopOptions),\n        ListPagination(paginationBottomOptions)\n    ]\n  };\n\n  var listObj = new List('listId', listOptions);\n&lt;/script></code></pre>\n\n    <div class=\"continue\">Next topic: <a href=\"/docs/plugins/fuzzysearch\">Fuzzy search plugin ›</a></div>\n"
  },
  {
    "path": "docs/docs/search-sort.html",
    "content": "---\nlayout: default\ntitle: Automagical Searching + Sorting\n---\n\n<h2>\n<a name=\"searching-sorting\" class=\"anchor\" href=\"#searching-sorting\"><span class=\"octicon octicon-link\"></span></a>Automagical Searching + Sorting</h2>\n\n<p>It is easy to add search input and sort buttons with just a few classes and attributes in your HTML. <em>&lsquo;Automagical&rsquo;</em> because List.js registers the event handlers, searches/sorts and updates the list for you:</p>\n\n<h3>\n<a name=\"searching-1\" class=\"anchor\" href=\"#searching-1\"><span class=\"octicon octicon-link\"></span></a>Searching</h3>\n\n<ul>\n  <li>\n    <p>\n    <strong><a name=\"class\" href=\"#class\" class=\"anchor\"></a>class</strong>  <em class=\"docs-parameter-description\">String. *required</em><br />\n    The default class <code>search</code> is how List.js finds your writable search field. If you change it also set <a href=\"{{ \"/api#searchClass\" | relative_url }}\">options.searchClass</a>.</p>\n    <p>\n    Alternatively, using <code>fuzzy-search</code> here will switch to the <a href='fuzzysearch.html'>Fuzzy Search</a> function.\n    </p>\n  </li>\n  <li>\n    <p>\n    <strong><a name=\"type\" href=\"#type\" class=\"anchor\"></a>type</strong> <em class=\"docs-parameter-description\">String. *required</em><br />\n    The default input type <code>search</code> is similar to using <code>text</code>, but web browsers may render it slightly differently: see <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search#Differences_between_search_and_text_types'>https://developer.mozilla.org/.../input/search</a>. Either type will work with List.js.\n    </p>\n  </li>\n</ul>\n\n<pre><code>\n&lt;input type=\"search\" class=\"search\" placeholder=\"normal search\"&gt; or\n&lt;input type=\"search\" class=\"fuzzy-search\" placeholder=\"fuzzy search!\"&gt;\n</code></pre>\n\n<h3><a name=\"sorting-1\" class=\"anchor\" href=\"#sorting-1\"><span class=\"octicon octicon-link\"></span></a>Sorting</h3>\n\n<ul>\n  <li>\n    <p><strong><a name=\"class2\" href=\"#class2\" class=\"anchor\"></a>class</strong> <em class=\"docs-parameter-description\">String. *required</em><br />\n    The default class <code>sort</code> is how List.js finds clickable sort buttons. If you change it also set <a href=\"{{ \"/api#sortClass\" | relative_url }}\">options.sortClass</a>.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong><a name=\"data-sort\" href=\"#data-sort\" class=\"anchor\"></a>data-sort</strong> <em class=\"docs-parameter-description\">String. *required</em><br />\n      This attribute on a clickable sort button should match the column name passed to List.js in <a href=\"{{ \"/api#valueNames\" | relative_url }}\">options.valueNames</a>.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong><a name=\"data-order\" href=\"#data-order\" class=\"anchor\"></a>data-order</strong> <em class=\"docs-parameter-description\">String</em><br>\n      Set to <code>asc</code> or <code>desc</code> to enforce that sorting order for a column. The user won't be able to change the order, and any <code>data-default-order</code> attribute is ignored.\n    </p>\n  </li>\n  <li>\n    <p>\n      <strong><a name=\"data-default-order\" href=\"#data-default-order\" class=\"anchor\"></a>data-default-order</strong> <em class=\"docs-parameter-description\">String, default: \"asc\"</em><br>\n      Set to <code>desc</code> to change the initial sorting order for a column. Subsequent clicks will toggle the sorting order between ascending/descending, as usual.\n  </p>\n</li>\n  <li>\n    <p>\n      <strong><a name=\"data-insensitive\" href=\"#data-insensitive\" class=\"anchor\"></a>data-insensitive</strong> <em class=\"docs-parameter-description\">Boolean, default: true</em><br>\n      Set to <code>false</code> for case-sensitive sorting of that column.\n    </p>\n  </li>\n</ul>\n\n<pre><code>\nSort by: \n&lt;span class='sort' data-sort='name'&gt;Name&lt;/span&gt; or \n&lt;span class='sort' data-sort='born' data-default-order='desc'&gt;Born in Year&lt;/span&gt; or \n&lt;span class='sort' data-sort='city'&gt;City&lt;/span&gt;\n</code></pre>\n\n<p>The CSS classes <code>asc</code> and <code>desc</code> are added when a sort button is clicked on, so List.js can show which column is currently sorted. For example, using this CSS sets a yellow background with &#x2B06; or &#x2B07; added after the button text:</p>\n\n<pre><code>\n.sort.asc, .sort.desc {\n  background-color: yellow;\n  }\n.sort.asc::after {\n  content: \"\\002B06\";\n  padding-left: 3px;\n  }\n.sort.desc::after {\n  content: \"\\002B07\";\n  padding-left: 3px\n  }\n</code></pre>\n"
  },
  {
    "path": "docs/faq.html",
    "content": "---\nlayout: default\ntitle: List FAQ\n---\n\n<h2>List FAQ</h2>\n\n<h4>Questions</h4>\n<ul class=\"api-index\">\n  <li><a href=\"#search-outside\">I want to have a search field outside the list container.</a></li>\n</ul>\n<br><br>\n\n<h4>\n    <a name=\"search-outside\" class=\"anchor\" href=\"#search-outside\"><span class=\"octicon octicon-link\"></span></a>\n    I want to have a search field outside the list container.\n</h4>\n<pre><code>&lt;input id=\"search-field\" />\n&lt;div id=\"container\"> ... &lt;/div></code></pre>\n<pre><code>var listObj = new List('container', options);\n\n$('#search-field').on('keyup', function() {\n  var searchString = $(this).val();\n  listObj.search(searchString);\n});</code></pre>\n"
  },
  {
    "path": "docs/feed.xml",
    "content": "---\nlayout: null\n---\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n  <channel>\n    <title>{{ site.title | xml_escape }}</title>\n    <description>{{ site.description | xml_escape }}</description>\n    <link>{{ site.url }}{{ site.baseurl }}/</link>\n    <atom:link href=\"{{ \"/feed.xml\" | prepend: site.baseurl | prepend: site.url }}\" rel=\"self\" type=\"application/rss+xml\"/>\n    <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>\n    <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>\n    <generator>Jekyll v{{ jekyll.version }}</generator>\n    {% for post in site.posts limit:10 %}\n      <item>\n        <title>{{ post.title | xml_escape }}</title>\n        <description>{{ post.content | xml_escape }}</description>\n        <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>\n        <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>\n        <guid isPermaLink=\"true\">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>\n        {% for tag in post.tags %}\n        <category>{{ tag | xml_escape }}</category>\n        {% endfor %}\n        {% for cat in post.categories %}\n        <category>{{ cat | xml_escape }}</category>\n        {% endfor %}\n      </item>\n    {% endfor %}\n  </channel>\n</rss>\n"
  },
  {
    "path": "docs/index.html",
    "content": "---\nlayout: default\ntitle: Search, sort, filters, flexibility to tables, list and more!\n---\n\n<div class=\"intro\">\n  <div class=\"intro-logo\">\n    <img src=\"{{ \"/assets/images/graphics/listjs-logo.png\" | relative_url }}\" />\n  </div>\n  <div class=\"intro-text\">\n    <h1>List.js <small>v{{site.data.pkg.version}}</small></h1>\n    <h2>\n      Tiny, invisible and simple, yet powerful and incredibly fast vanilla JavaScript\n      that adds <em>search</em>, <em>sort</em>, <em>filters</em> and <em>flexibility</em>\n      to plain HTML <em>lists</em>, <em>tables</em>, or anything.\n    </h2>\n  </div>\n</div>\n\n{% include author.html %}\n\n{% include examples/annotated-example.html %}\n\n<div class=\"startpage-more-examples\">\n  <h3>More examples</h3>\n  <ul>\n    {% for example in site.examples %}\n      <li><a href=\"{{example.url | relative_url }}\">{{example.name}}</a></li>\n    {% endfor %}\n  </ul>\n</div>\n\n\n<div class=\"startpage-quotes\">\n  <div class=\"startpage-quotes-quote\">\n    <blockquote class=\"twitter-tweet\"><p>List.js: native JavaScript that makes your plain HTML lists super flexible, searchable, sortable and filterable - <a href=\"https://t.co/nOoE1RJg\">https://t.co/nOoE1RJg</a></p>&mdash; Smashing Magazine (@smashingmag) <a href=\"https://twitter.com/smashingmag/statuses/148142949287477248\">December 17, 2011</a></blockquote>\n  </div>\n  <div class=\"startpage-quotes-quote\">\n    <blockquote class=\"twitter-tweet\" lang=\"en\"><p>Search, sort, and filter your <a href=\"https://twitter.com/search?q=%23HTML&amp;src=hash\">#HTML</a> tables, lists, and more with List.js <a href=\"https://t.co/4BHjmOEU56\">https://t.co/4BHjmOEU56</a> – dev&#39;d by <a href=\"https://twitter.com/javve\">@javve</a> log&#39;d by <a href=\"https://twitter.com/jerodsanto\">@jerodsanto</a> <a href=\"https://twitter.com/search?q=%23js&amp;src=hash\">#js</a></p>&mdash; The Changelog (@TheChangelog) <a href=\"https://twitter.com/TheChangelog/statuses/406428113510604800\">November 29, 2013</a></blockquote>\n  </div>\n  <div class=\"startpage-quotes-quote\">\n    <blockquote class=\"twitter-tweet\"><p>List.js: Add Search, Sort and Flexibility to HTML Lists or Tables - <a href=\"https://t.co/ygEp2Tk7Pu\">https://t.co/ygEp2Tk7Pu</a> (“Native” JavaScript, no dependencies.)</p>&mdash; JavaScript Daily (@JavaScriptDaily) <a href=\"https://twitter.com/JavaScriptDaily/statuses/335832684137943040\">May 18, 2013</a></blockquote>\n  </div>\n</div>\n"
  },
  {
    "path": "docs/overview/changelog.html",
    "content": "---\nlayout: default\ntitle: Read the changelog at Github\n---\n\n<h2>Changelog</h2>\n<p><a href=\"https://github.com/javve/list.js/blob/master/CHANGELOG.md\">Go to the changelog at GitHub</a></p>\n"
  },
  {
    "path": "docs/overview/contribute.html",
    "content": "---\nlayout: default\ntitle: Contribute\n---\n\n    <h2>Setup environment</h2>\n    <h4>1. Install Node.js</h4>\n    <p>Go to <a href=\"https://nodejs.org/\">Nodejs.org</a></p>\n\n    <h4>2. Install dependencies</h4>\n    <pre><code>npm install</code></pre>\n\n    <h2>Compile and test</h2>\n    <h4>Compile the script <code>(webpack.config.js)</code></h4>\n    <pre><code>npx webpack</code></pre>\n\n    <h4>Watch and recompile when files change</h4>\n    <pre><code>npx webpack --watch</code></pre>\n\n    <h4>Run the test suite</h4>\n    <pre><code>npx jest</code></pre>\n    <p>Run tests continuously when files change</p>\n    <pre><code>npx jest --watch</code></pre>\n\n    <h2>Guidelines for making pull requests</h2>\n    <ul>\n      <li>Add tests if applicable.</li>\n      <li>Make sure all tests run. <em>Preferably in IE7+</em></li>\n      <li>Do <b>not</b> include <code>dist/list.js</code> or <code>dist/list.min.js</code>. That file is only update for each release.</li>\n      <li>ONE feature per pull request</li>\n      <li><i>List.js is used in a lot of different ways on a lot of places, so please have understanding if your new special feature is not accepted :)</i></li>\n    </ul>\n"
  },
  {
    "path": "docs/overview/download.html",
    "content": "---\nlayout: default\ntitle: Download\n---\n\n<h2>Download</h2>\n\n<p>The core thing in List.js have always been simplicity. It should require as little effort as possible to use the script and it's features.</p>\n\n<h4>Via <a href=\"https://github.com/javve/list.js\">GitHub</a></h4>\n<a style=\"margin-bottom:5px;\" href=\"https://raw.githubusercontent.com/javve/list.js/v{{site.data.pkg.version}}/dist/list.min.js\" class=\"btn btn-primary\">Download compressed List.js</a> &nbsp; <em><small>5KB with gzip</em></small><br />\n<a href=\"https://raw.githubusercontent.com/javve/list.js/v{{site.data.pkg.version}}/dist/list.js\" class=\"btn btn-primary\">Download uncompressed List.js</a>\n\n<h4>Via <a href=\"https://www.npmjs.com/package/list.js\">NPM</a></h4>\n<pre><code>npm install list.js</code></pre>\n\n<h4>Via <a href=\"https://bower.io/\">Bower</a></h4>\n<pre><code>bower install list.js</code></pre>\n\n<h4>Via <a href=\"https://cdnjs.com/\">CDNJS</a></h4>\n<pre><code>&lt;script src=\"//cdnjs.cloudflare.com/ajax/libs/list.js/{{site.data.pkg.version}}/list.min.js\">&lt;/script></code></pre>\n\n<div class=\"continue\">Next topic: <a href=\"{{ \"/docs\" | relative_url }}\">Getting started ›</a></div>\n"
  },
  {
    "path": "docs/overview/index.html",
    "content": "---\nlayout: default\ntitle: TL;DR / Features\n---\n\n<h2>TL;DR</h2>\n\n<p>Perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.</p>\n\n<h3>Core idea</h3>\n<ul>\n  <li>Simple and invisible</li>\n  <li>Easy to apply to existing HTML</li>\n  <li>No dependencies</li>\n  <li>Fast</li>\n  <li>Tiny <em>(5KB minified&gzip)</em></li>\n  <li>Handle thousands of items</li>\n</ul>\n\n<h3>Features</h3>\n<ul>\n  <li>Works both lists, tables and almost anything else. E.g. <code>&lt;div></code>,<code>&lt;ul></code>,<code>&lt;table></code>, etc.</li>\n  <li>Search <small><a href=\"{{ \"/docs/list-api#search\" | relative_url }}\">Read more ›</a></small></li>\n  <li>Sort <small><a href=\"{{ \"/docs/list-api#sort\" | relative_url }}\">Read more ›</a></small></li>\n  <li>Filter <small><a href=\"{{ \"/docs/list-api#filter\" | relative_url }}\">Read more ›</a></small></li>\n  <li>Simple templating system that adds possibility to add, edit, remove items <small><a href=\"{{ \"/docs/list-api#add\" | relative_url }}\">Read more ›</a></small></li>\n  <li>Plugins <small><a href=\"{{ \"/docs/plugins\" | relative_url }}\">Read more ›</a></small></li>\n  <li>Support for Chrome, Safari, Firefox, IE9+</li>\n</ul>\n\n<h3>Used by</h3>\n<ul>\n  <li><a href=\"https://html5please.com/\">HTML5Please.com</a></li>\n  <li><a href=\"http://www.emoji-cheat-sheet.com/\">Emoji cheat sheet</a></li>\n  <li><em>A bunch more...</em></li>\n</ul>\n"
  },
  {
    "path": "docs/overview/press.html",
    "content": "<h1>Press</h1>\n\n<div style=\"width:49%; float:left; margin-right:1%;\">\n  <blockquote class=\"twitter-tweet\"><p>List.js: native JavaScript that makes your plain HTML lists super flexible, searchable, sortable and filterable - <a href=\"https://t.co/nOoE1RJg\">https://t.co/nOoE1RJg</a></p>&mdash; Smashing Magazine (@smashingmag) <a href=\"https://twitter.com/smashingmag/statuses/148142949287477248\">December 17, 2011</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>ABSOLUTELY FUCKING BRILLIANT &gt; <a href=\"https://t.co/wuOiYlRe\">https://t.co/wuOiYlRe</a></p>&mdash; Zeus Lalkaka (@distracteddev) <a href=\"https://twitter.com/distracteddev/statuses/181365908768436224\">March 18, 2012</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>The ultimate javascript list behaviourer: searchable, sortable, filterable, flexible: List.js <a href=\"https://t.co/dcomX9Tr\">https://t.co/dcomX9Tr</a></p>&mdash; Robert McLarty (@robmclarty) <a href=\"https://twitter.com/robmclarty/statuses/194800589304115200\">April 24, 2012</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>To all the cool people who build and release stuff such as listJS - thank you, and I love you :-) <a href=\"https://t.co/Erx7oGD3Tl\">https://t.co/Erx7oGD3Tl</a></p>&mdash; Stefan Richter (@stefanrichter) <a href=\"https://twitter.com/stefanrichter/statuses/334991326774960128\">May 16, 2013</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>I&#39;m a sucker for slick efficient native js micro-plugins like Countable.js <a href=\"https://t.co/qLkDbyC9Mn\">https://t.co/qLkDbyC9Mn</a> and List.js <a href=\"https://t.co/NsCDlH9UL5\">https://t.co/NsCDlH9UL5</a></p>&mdash; Graham (@_grayham) <a href=\"https://twitter.com/_grayham/statuses/340087741415038976\">May 30, 2013</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>Fantastic. And what&#39;s even more brilliant ? <a href=\"https://twitter.com/search?q=%23vanillajs&amp;src=hash\">#vanillajs</a> ~ RT <a href=\"https://twitter.com/JavaScriptDaily\">@JavaScriptDaily</a>: List.js: Add Search, Sort and... <a href=\"https://t.co/cCdQBgftsY\">https://t.co/cCdQBgftsY</a></p>&mdash; Sriram Velamur (@techieV2) <a href=\"https://twitter.com/techieV2/statuses/335833479604473857\">May 18, 2013</a></blockquote>\n</div>\n<div style=\"width:49%; float:left\">\n  <blockquote class=\"twitter-tweet\"><p>List.js: Add Search, Sort and Flexibility to HTML Lists or Tables - <a href=\"https://t.co/ygEp2Tk7Pu\">https://t.co/ygEp2Tk7Pu</a> (“Native” JavaScript, no dependencies.)</p>&mdash; JavaScript Daily (@JavaScriptDaily) <a href=\"https://twitter.com/JavaScriptDaily/statuses/335832684137943040\">May 18, 2013</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>Man, List.js is sooo nice to work with - <a href=\"https://t.co/eCTLBFMY\">https://t.co/eCTLBFMY</a></p>&mdash; Rusty Meadows (@rameadows) <a href=\"https://twitter.com/rameadows/statuses/224654749205659648\">July 16, 2012</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>I don&#39;t use this lib, but the logo looks super nice <a href=\"https://twitter.com/javve\">@javve</a> <a href=\"https://t.co/wGtQSvRkXH\">https://t.co/wGtQSvRkXH</a></p>&mdash; Jordi Maylin (@j_maylin) <a href=\"https://twitter.com/j_maylin/statuses/377370385953476608\">September 10, 2013</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>Holy crap, think I&#39;ll be using List.js with my Spine.JS app very very soon. <a href=\"https://t.co/59AZLxYT\">https://t.co/59AZLxYT</a></p>&mdash; Ken Collins (@metaskills) <a href=\"https://twitter.com/metaskills/statuses/162974952516096000\">January 27, 2012</a></blockquote>\n  <blockquote class=\"twitter-tweet\"><p>I released my os project List.js ( <a href=\"https://t.co/SX5UdDKE\">https://t.co/SX5UdDKE</a> ) yesterday, today its #1 at Hacker News, omg. <a href=\"https://t.co/hTo9CTmF\">https://t.co/hTo9CTmF</a> <a href=\"https://twitter.com/search?q=%23happy&amp;src=hash\">#happy</a></p>&mdash; Jonny Strömberg (@javve) <a href=\"https://twitter.com/javve/statuses/127054400983281664\">October 20, 2011</a></blockquote>\n</div>\n\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"list.js\",\n  \"version\": \"2.3.1\",\n  \"description\": \"The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML\",\n  \"keywords\": [\n    \"list\",\n    \"search\",\n    \"sort\",\n    \"table\",\n    \"dom\",\n    \"html\",\n    \"ui\"\n  ],\n  \"author\": {\n    \"name\": \"Jonny Strömberg\",\n    \"email\": \"jonny.stromberg@gmail.com\",\n    \"url\": \"https://javve.com\"\n  },\n  \"homepage\": \"https://listjs.com\",\n  \"repository\": \"git://github.com/javve/list.js.git\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/javve/list.js/issues\"\n  },\n  \"dependencies\": {\n    \"string-natural-compare\": \"^2.0.2\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.12.7\",\n    \"@babel/preset-env\": \"^7.12.7\",\n    \"babel-loader\": \"^8.2.1\",\n    \"jest\": \"^26.6.3\",\n    \"jquery\": \"^3.5.1\",\n    \"prettier\": \"^2.2.0\",\n    \"webpack\": \"^5.6.0\",\n    \"webpack-cli\": \"^4.2.0\"\n  },\n  \"main\": \"src/index\",\n  \"engines\": {\n    \"node\": \"^6.0 || ^8.0 || ^10.0 || ^12.0 || >=14\"\n  },\n  \"scripts\": {\n    \"test\": \"npx jest\",\n    \"build\": \"npx webpack\",\n    \"watch\": \"npx webpack --watch\",\n    \"watch-test\": \"npx jest --watch\",\n    \"preversion\": \"npm test && npm run build && cp dist/list.min.js docs/assets/javascripts/list.min.js && cp dist/list.min.js.map docs/assets/javascripts/list.min.js.map && git add dist && git add docs/assets/javascripts\",\n    \"postversion\": \"git push --follow-tags origin master && cp package.json docs/_data/pkg.json && git add docs/_data/pkg.json && git commit -m \\\"pkg.json update\\\"\"\n  },\n  \"npmName\": \"list.js\",\n  \"npmFileMap\": [\n    {\n      \"basePath\": \"/dist/\",\n      \"files\": [\n        \"*.js\",\n        \"*.js.map\"\n      ]\n    }\n  ],\n  \"jest\": {\n    \"coverageDirectory\": \"./coverage/\",\n    \"collectCoverage\": true,\n    \"collectCoverageFrom\": [\n      \"src/*.js\",\n      \"src/utils/*.js\"\n    ],\n    \"testURL\": \"http://localhost/\"\n  }\n}\n"
  },
  {
    "path": "prettier.config.js",
    "content": "module.exports = {\n  semi: false,\n  singleQuote: true,\n  printWidth: 120,\n}"
  },
  {
    "path": "src/add-async.js",
    "content": "module.exports = function (list) {\n  var addAsync = function (values, callback, items) {\n    var valuesToAdd = values.splice(0, 50)\n    items = items || []\n    items = items.concat(list.add(valuesToAdd))\n    if (values.length > 0) {\n      setTimeout(function () {\n        addAsync(values, callback, items)\n      }, 1)\n    } else {\n      list.update()\n      callback(items)\n    }\n  }\n  return addAsync\n}\n"
  },
  {
    "path": "src/filter.js",
    "content": "module.exports = function (list) {\n  // Add handlers\n  list.handlers.filterStart = list.handlers.filterStart || []\n  list.handlers.filterComplete = list.handlers.filterComplete || []\n\n  return function (filterFunction) {\n    list.trigger('filterStart')\n    list.i = 1 // Reset paging\n    list.reset.filter()\n    if (filterFunction === undefined) {\n      list.filtered = false\n    } else {\n      list.filtered = true\n      var is = list.items\n      for (var i = 0, il = is.length; i < il; i++) {\n        var item = is[i]\n        if (filterFunction(item)) {\n          item.filtered = true\n        } else {\n          item.filtered = false\n        }\n      }\n    }\n    list.update()\n    list.trigger('filterComplete')\n    return list.visibleItems\n  }\n}\n"
  },
  {
    "path": "src/fuzzy-search.js",
    "content": "var classes = require('./utils/classes'),\n  events = require('./utils/events'),\n  extend = require('./utils/extend'),\n  toString = require('./utils/to-string'),\n  getByClass = require('./utils/get-by-class'),\n  fuzzy = require('./utils/fuzzy')\n\nmodule.exports = function (list, options) {\n  options = options || {}\n\n  options = extend(\n    {\n      location: 0,\n      distance: 100,\n      threshold: 0.4,\n      multiSearch: true,\n      searchClass: 'fuzzy-search',\n    },\n    options\n  )\n\n  var fuzzySearch = {\n    search: function (searchString, columns) {\n      // Substract arguments from the searchString or put searchString as only argument\n      var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]\n\n      for (var k = 0, kl = list.items.length; k < kl; k++) {\n        fuzzySearch.item(list.items[k], columns, searchArguments)\n      }\n    },\n    item: function (item, columns, searchArguments) {\n      var found = true\n      for (var i = 0; i < searchArguments.length; i++) {\n        var foundArgument = false\n        for (var j = 0, jl = columns.length; j < jl; j++) {\n          if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {\n            foundArgument = true\n          }\n        }\n        if (!foundArgument) {\n          found = false\n        }\n      }\n      item.found = found\n    },\n    values: function (values, value, searchArgument) {\n      if (values.hasOwnProperty(value)) {\n        var text = toString(values[value]).toLowerCase()\n\n        if (fuzzy(text, searchArgument, options)) {\n          return true\n        }\n      }\n      return false\n    },\n  }\n\n  events.bind(\n    getByClass(list.listContainer, options.searchClass),\n    'keyup',\n    list.utils.events.debounce(function (e) {\n      var target = e.target || e.srcElement // IE have srcElement\n      list.search(target.value, fuzzySearch.search)\n    }, list.searchDelay)\n  )\n\n  return function (str, columns) {\n    list.search(str, columns, fuzzySearch.search)\n  }\n}\n"
  },
  {
    "path": "src/index.js",
    "content": "var naturalSort = require('string-natural-compare'),\n  getByClass = require('./utils/get-by-class'),\n  extend = require('./utils/extend'),\n  indexOf = require('./utils/index-of'),\n  events = require('./utils/events'),\n  toString = require('./utils/to-string'),\n  classes = require('./utils/classes'),\n  getAttribute = require('./utils/get-attribute'),\n  toArray = require('./utils/to-array')\n\nmodule.exports = function (id, options, values) {\n  var self = this,\n    init,\n    Item = require('./item')(self),\n    addAsync = require('./add-async')(self),\n    initPagination = require('./pagination')(self)\n\n  init = {\n    start: function () {\n      self.listClass = 'list'\n      self.searchClass = 'search'\n      self.sortClass = 'sort'\n      self.page = 10000\n      self.i = 1\n      self.items = []\n      self.visibleItems = []\n      self.matchingItems = []\n      self.searched = false\n      self.filtered = false\n      self.searchColumns = undefined\n      self.searchDelay = 0\n      self.handlers = { updated: [] }\n      self.valueNames = []\n      self.utils = {\n        getByClass: getByClass,\n        extend: extend,\n        indexOf: indexOf,\n        events: events,\n        toString: toString,\n        naturalSort: naturalSort,\n        classes: classes,\n        getAttribute: getAttribute,\n        toArray: toArray,\n      }\n\n      self.utils.extend(self, options)\n\n      self.listContainer = typeof id === 'string' ? document.getElementById(id) : id\n      if (!self.listContainer) {\n        return\n      }\n      self.list = getByClass(self.listContainer, self.listClass, true)\n\n      self.parse = require('./parse')(self)\n      self.templater = require('./templater')(self)\n      self.search = require('./search')(self)\n      self.filter = require('./filter')(self)\n      self.sort = require('./sort')(self)\n      self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)\n\n      this.handlers()\n      this.items()\n      this.pagination()\n\n      self.update()\n    },\n    handlers: function () {\n      for (var handler in self.handlers) {\n        if (self[handler] && self.handlers.hasOwnProperty(handler)) {\n          self.on(handler, self[handler])\n        }\n      }\n    },\n    items: function () {\n      self.parse(self.list)\n      if (values !== undefined) {\n        self.add(values)\n      }\n    },\n    pagination: function () {\n      if (options.pagination !== undefined) {\n        if (options.pagination === true) {\n          options.pagination = [{}]\n        }\n        if (options.pagination[0] === undefined) {\n          options.pagination = [options.pagination]\n        }\n        for (var i = 0, il = options.pagination.length; i < il; i++) {\n          initPagination(options.pagination[i])\n        }\n      }\n    },\n  }\n\n  /*\n   * Re-parse the List, use if html have changed\n   */\n  this.reIndex = function () {\n    self.items = []\n    self.visibleItems = []\n    self.matchingItems = []\n    self.searched = false\n    self.filtered = false\n    self.parse(self.list)\n  }\n\n  this.toJSON = function () {\n    var json = []\n    for (var i = 0, il = self.items.length; i < il; i++) {\n      json.push(self.items[i].values())\n    }\n    return json\n  }\n\n  /*\n   * Add object to list\n   */\n  this.add = function (values, callback) {\n    if (values.length === 0) {\n      return\n    }\n    if (callback) {\n      addAsync(values.slice(0), callback)\n      return\n    }\n    var added = [],\n      notCreate = false\n    if (values[0] === undefined) {\n      values = [values]\n    }\n    for (var i = 0, il = values.length; i < il; i++) {\n      var item = null\n      notCreate = self.items.length > self.page ? true : false\n      item = new Item(values[i], undefined, notCreate)\n      self.items.push(item)\n      added.push(item)\n    }\n    self.update()\n    return added\n  }\n\n  this.show = function (i, page) {\n    this.i = i\n    this.page = page\n    self.update()\n    return self\n  }\n\n  /* Removes object from list.\n   * Loops through the list and removes objects where\n   * property \"valuename\" === value\n   */\n  this.remove = function (valueName, value, options) {\n    var found = 0\n    for (var i = 0, il = self.items.length; i < il; i++) {\n      if (self.items[i].values()[valueName] == value) {\n        self.templater.remove(self.items[i], options)\n        self.items.splice(i, 1)\n        il--\n        i--\n        found++\n      }\n    }\n    self.update()\n    return found\n  }\n\n  /* Gets the objects in the list which\n   * property \"valueName\" === value\n   */\n  this.get = function (valueName, value) {\n    var matchedItems = []\n    for (var i = 0, il = self.items.length; i < il; i++) {\n      var item = self.items[i]\n      if (item.values()[valueName] == value) {\n        matchedItems.push(item)\n      }\n    }\n    return matchedItems\n  }\n\n  /*\n   * Get size of the list\n   */\n  this.size = function () {\n    return self.items.length\n  }\n\n  /*\n   * Removes all items from the list\n   */\n  this.clear = function () {\n    self.templater.clear()\n    self.items = []\n    return self\n  }\n\n  this.on = function (event, callback) {\n    self.handlers[event].push(callback)\n    return self\n  }\n\n  this.off = function (event, callback) {\n    var e = self.handlers[event]\n    var index = indexOf(e, callback)\n    if (index > -1) {\n      e.splice(index, 1)\n    }\n    return self\n  }\n\n  this.trigger = function (event) {\n    var i = self.handlers[event].length\n    while (i--) {\n      self.handlers[event][i](self)\n    }\n    return self\n  }\n\n  this.reset = {\n    filter: function () {\n      var is = self.items,\n        il = is.length\n      while (il--) {\n        is[il].filtered = false\n      }\n      return self\n    },\n    search: function () {\n      var is = self.items,\n        il = is.length\n      while (il--) {\n        is[il].found = false\n      }\n      return self\n    },\n  }\n\n  this.update = function () {\n    var is = self.items,\n      il = is.length\n\n    self.visibleItems = []\n    self.matchingItems = []\n    self.templater.clear()\n    for (var i = 0; i < il; i++) {\n      if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n        is[i].show()\n        self.visibleItems.push(is[i])\n        self.matchingItems.push(is[i])\n      } else if (is[i].matching()) {\n        self.matchingItems.push(is[i])\n        is[i].hide()\n      } else {\n        is[i].hide()\n      }\n    }\n    self.trigger('updated')\n    return self\n  }\n\n  init.start()\n}\n"
  },
  {
    "path": "src/item.js",
    "content": "module.exports = function (list) {\n  return function (initValues, element, notCreate) {\n    var item = this\n\n    this._values = {}\n\n    this.found = false // Show if list.searched == true and this.found == true\n    this.filtered = false // Show if list.filtered == true and this.filtered == true\n\n    var init = function (initValues, element, notCreate) {\n      if (element === undefined) {\n        if (notCreate) {\n          item.values(initValues, notCreate)\n        } else {\n          item.values(initValues)\n        }\n      } else {\n        item.elm = element\n        var values = list.templater.get(item, initValues)\n        item.values(values)\n      }\n    }\n\n    this.values = function (newValues, notCreate) {\n      if (newValues !== undefined) {\n        for (var name in newValues) {\n          item._values[name] = newValues[name]\n        }\n        if (notCreate !== true) {\n          list.templater.set(item, item.values())\n        }\n      } else {\n        return item._values\n      }\n    }\n\n    this.show = function () {\n      list.templater.show(item)\n    }\n\n    this.hide = function () {\n      list.templater.hide(item)\n    }\n\n    this.matching = function () {\n      return (\n        (list.filtered && list.searched && item.found && item.filtered) ||\n        (list.filtered && !list.searched && item.filtered) ||\n        (!list.filtered && list.searched && item.found) ||\n        (!list.filtered && !list.searched)\n      )\n    }\n\n    this.visible = function () {\n      return item.elm && item.elm.parentNode == list.list ? true : false\n    }\n\n    init(initValues, element, notCreate)\n  }\n}\n"
  },
  {
    "path": "src/pagination.js",
    "content": "var classes = require('./utils/classes'),\n  events = require('./utils/events'),\n  List = require('./index')\n\nmodule.exports = function (list) {\n  var isHidden = false\n\n  var refresh = function (pagingList, options) {\n    if (list.page < 1) {\n      list.listContainer.style.display = 'none'\n      isHidden = true\n      return\n    } else if (isHidden) {\n      list.listContainer.style.display = 'block'\n    }\n\n    var item,\n      l = list.matchingItems.length,\n      index = list.i,\n      page = list.page,\n      pages = Math.ceil(l / page),\n      currentPage = Math.ceil(index / page),\n      innerWindow = options.innerWindow || 2,\n      left = options.left || options.outerWindow || 0,\n      right = options.right || options.outerWindow || 0\n\n    right = pages - right\n    pagingList.clear()\n    for (var i = 1; i <= pages; i++) {\n      var className = currentPage === i ? 'active' : ''\n\n      //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n      if (is.number(i, left, right, currentPage, innerWindow)) {\n        item = pagingList.add({\n          page: i,\n          dotted: false,\n        })[0]\n        if (className) {\n          classes(item.elm).add(className)\n        }\n        item.elm.firstChild.setAttribute('data-i', i)\n        item.elm.firstChild.setAttribute('data-page', page)\n      } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n        item = pagingList.add({\n          page: '...',\n          dotted: true,\n        })[0]\n        classes(item.elm).add('disabled')\n      }\n    }\n  }\n\n  var is = {\n    number: function (i, left, right, currentPage, innerWindow) {\n      return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)\n    },\n    left: function (i, left) {\n      return i <= left\n    },\n    right: function (i, right) {\n      return i > right\n    },\n    innerWindow: function (i, currentPage, innerWindow) {\n      return i >= currentPage - innerWindow && i <= currentPage + innerWindow\n    },\n    dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n      return (\n        this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||\n        this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)\n      )\n    },\n    dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {\n      return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n    },\n    dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n      if (pagingList.items[currentPageItem - 1].values().dotted) {\n        return false\n      } else {\n        return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n      }\n    },\n  }\n\n  return function (options) {\n    var pagingList = new List(list.listContainer.id, {\n      listClass: options.paginationClass || 'pagination',\n      item: options.item || \"<li><a class='page' href='#'></a></li>\",\n      valueNames: ['page', 'dotted'],\n      searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n      sortClass: 'pagination-sort-that-is-not-supposed-to-exist',\n    })\n\n    events.bind(pagingList.listContainer, 'click', function (e) {\n      var target = e.target || e.srcElement,\n        page = list.utils.getAttribute(target, 'data-page'),\n        i = list.utils.getAttribute(target, 'data-i')\n      if (i) {\n        list.show((i - 1) * page + 1, page)\n      }\n    })\n\n    list.on('updated', function () {\n      refresh(pagingList, options)\n    })\n    refresh(pagingList, options)\n  }\n}\n"
  },
  {
    "path": "src/parse.js",
    "content": "module.exports = function (list) {\n  var Item = require('./item')(list)\n\n  var getChildren = function (parent) {\n    var nodes = parent.childNodes,\n      items = []\n    for (var i = 0, il = nodes.length; i < il; i++) {\n      // Only textnodes have a data attribute\n      if (nodes[i].data === undefined) {\n        items.push(nodes[i])\n      }\n    }\n    return items\n  }\n\n  var parse = function (itemElements, valueNames) {\n    for (var i = 0, il = itemElements.length; i < il; i++) {\n      list.items.push(new Item(valueNames, itemElements[i]))\n    }\n  }\n  var parseAsync = function (itemElements, valueNames) {\n    var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?\n    parse(itemsToIndex, valueNames)\n    if (itemElements.length > 0) {\n      setTimeout(function () {\n        parseAsync(itemElements, valueNames)\n      }, 1)\n    } else {\n      list.update()\n      list.trigger('parseComplete')\n    }\n  }\n\n  list.handlers.parseComplete = list.handlers.parseComplete || []\n\n  return function () {\n    var itemsToIndex = getChildren(list.list),\n      valueNames = list.valueNames\n\n    if (list.indexAsync) {\n      parseAsync(itemsToIndex, valueNames)\n    } else {\n      parse(itemsToIndex, valueNames)\n    }\n  }\n}\n"
  },
  {
    "path": "src/search.js",
    "content": "module.exports = function (list) {\n  var item, text, columns, searchString, customSearch\n\n  var prepare = {\n    resetList: function () {\n      list.i = 1\n      list.templater.clear()\n      customSearch = undefined\n    },\n    setOptions: function (args) {\n      if (args.length == 2 && args[1] instanceof Array) {\n        columns = args[1]\n      } else if (args.length == 2 && typeof args[1] == 'function') {\n        columns = undefined\n        customSearch = args[1]\n      } else if (args.length == 3) {\n        columns = args[1]\n        customSearch = args[2]\n      } else {\n        columns = undefined\n      }\n    },\n    setColumns: function () {\n      if (list.items.length === 0) return\n      if (columns === undefined) {\n        columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns\n      }\n    },\n    setSearchString: function (s) {\n      s = list.utils.toString(s).toLowerCase()\n      s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&') // Escape regular expression characters\n      searchString = s\n    },\n    toArray: function (values) {\n      var tmpColumn = []\n      for (var name in values) {\n        tmpColumn.push(name)\n      }\n      return tmpColumn\n    },\n  }\n  var search = {\n    list: function () {\n      // Extract quoted phrases \"word1 word2\" from original searchString\n      // searchString is converted to lowercase by List.js\n      var words = [],\n        phrase,\n        ss = searchString\n      while ((phrase = ss.match(/\"([^\"]+)\"/)) !== null) {\n        words.push(phrase[1])\n        ss = ss.substring(0, phrase.index) + ss.substring(phrase.index + phrase[0].length)\n      }\n      // Get remaining space-separated words (if any)\n      ss = ss.trim()\n      if (ss.length) words = words.concat(ss.split(/\\s+/))\n      for (var k = 0, kl = list.items.length; k < kl; k++) {\n        var item = list.items[k]\n        item.found = false\n        if (!words.length) continue\n        for (var i = 0, il = words.length; i < il; i++) {\n          var word_found = false\n          for (var j = 0, jl = columns.length; j < jl; j++) {\n            var values = item.values(),\n              column = columns[j]\n            if (values.hasOwnProperty(column) && values[column] !== undefined && values[column] !== null) {\n              var text = typeof values[column] !== 'string' ? values[column].toString() : values[column]\n              if (text.toLowerCase().indexOf(words[i]) !== -1) {\n                // word found, so no need to check it against any other columns\n                word_found = true\n                break\n              }\n            }\n          }\n          // this word not found? no need to check any other words, the item cannot match\n          if (!word_found) break\n        }\n        item.found = word_found\n      }\n    },\n    // Removed search.item() and search.values()\n    reset: function () {\n      list.reset.search()\n      list.searched = false\n    },\n  }\n\n  var searchMethod = function (str) {\n    list.trigger('searchStart')\n\n    prepare.resetList()\n    prepare.setSearchString(str)\n    prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction\n    prepare.setColumns()\n\n    if (searchString === '') {\n      search.reset()\n    } else {\n      list.searched = true\n      if (customSearch) {\n        customSearch(searchString, columns)\n      } else {\n        search.list()\n      }\n    }\n\n    list.update()\n    list.trigger('searchComplete')\n    return list.visibleItems\n  }\n\n  list.handlers.searchStart = list.handlers.searchStart || []\n  list.handlers.searchComplete = list.handlers.searchComplete || []\n\n  list.utils.events.bind(\n    list.utils.getByClass(list.listContainer, list.searchClass),\n    'keyup',\n    list.utils.events.debounce(function (e) {\n      var target = e.target || e.srcElement, // IE have srcElement\n        alreadyCleared = target.value === '' && !list.searched\n      if (!alreadyCleared) {\n        // If oninput already have resetted the list, do nothing\n        searchMethod(target.value)\n      }\n    }, list.searchDelay)\n  )\n\n  // Used to detect click on HTML5 clear button\n  list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) {\n    var target = e.target || e.srcElement\n    if (target.value === '') {\n      searchMethod('')\n    }\n  })\n\n  return searchMethod\n}\n"
  },
  {
    "path": "src/sort.js",
    "content": "module.exports = function (list) {\n  var buttons = {\n    els: undefined,\n    clear: function () {\n      for (var i = 0, il = buttons.els.length; i < il; i++) {\n        list.utils.classes(buttons.els[i]).remove('asc')\n        list.utils.classes(buttons.els[i]).remove('desc')\n      }\n    },\n    getOrder: function (btn) {\n      var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n      if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n        return predefinedOrder\n      } else if (list.utils.classes(btn).has('desc')) {\n        return 'asc'\n      } else if (list.utils.classes(btn).has('asc')) {\n        return 'desc'\n      } else {\n        return 'asc'\n      }\n    },\n    getInSensitive: function (btn, options) {\n      var insensitive = list.utils.getAttribute(btn, 'data-insensitive')\n      if (insensitive === 'false') {\n        options.insensitive = false\n      } else {\n        options.insensitive = true\n      }\n    },\n    setOrder: function (options) {\n      for (var i = 0, il = buttons.els.length; i < il; i++) {\n        var btn = buttons.els[i]\n        if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n          continue\n        }\n        var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n        if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n          if (predefinedOrder == options.order) {\n            list.utils.classes(btn).add(options.order)\n          }\n        } else {\n          list.utils.classes(btn).add(options.order)\n        }\n      }\n    },\n  }\n\n  var sort = function () {\n    list.trigger('sortStart')\n    var options = {}\n\n    var target = arguments[0].currentTarget || arguments[0].srcElement || undefined\n\n    if (target) {\n      options.valueName = list.utils.getAttribute(target, 'data-sort')\n      buttons.getInSensitive(target, options)\n      options.order = buttons.getOrder(target)\n    } else {\n      options = arguments[1] || options\n      options.valueName = arguments[0]\n      options.order = options.order || 'asc'\n      options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive\n    }\n\n    buttons.clear()\n    buttons.setOrder(options)\n\n    // caseInsensitive\n    // alphabet\n    var customSortFunction = options.sortFunction || list.sortFunction || null,\n      multi = options.order === 'desc' ? -1 : 1,\n      sortFunction\n\n    if (customSortFunction) {\n      sortFunction = function (itemA, itemB) {\n        return customSortFunction(itemA, itemB, options) * multi\n      }\n    } else {\n      sortFunction = function (itemA, itemB) {\n        var sort = list.utils.naturalSort\n        sort.alphabet = list.alphabet || options.alphabet || undefined\n        if (!sort.alphabet && options.insensitive) {\n          sort = list.utils.naturalSort.caseInsensitive\n        }\n        return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi\n      }\n    }\n\n    list.items.sort(sortFunction)\n    list.update()\n    list.trigger('sortComplete')\n  }\n\n  // Add handlers\n  list.handlers.sortStart = list.handlers.sortStart || []\n  list.handlers.sortComplete = list.handlers.sortComplete || []\n\n  buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)\n  list.utils.events.bind(buttons.els, 'click', sort)\n  list.on('searchStart', buttons.clear)\n  list.on('filterStart', buttons.clear)\n\n  return sort\n}\n"
  },
  {
    "path": "src/templater.js",
    "content": "var Templater = function (list) {\n  var createItem,\n    templater = this\n\n  var init = function () {\n    var itemSource\n\n    if (typeof list.item === 'function') {\n      createItem = function (values) {\n        var item = list.item(values)\n        return getItemSource(item)\n      }\n      return\n    }\n\n    if (typeof list.item === 'string') {\n      if (list.item.indexOf('<') === -1) {\n        itemSource = document.getElementById(list.item)\n      } else {\n        itemSource = getItemSource(list.item)\n      }\n    } else {\n      /* If item source does not exists, use the first item in list as\n      source for new items */\n      itemSource = getFirstListItem()\n    }\n\n    if (!itemSource) {\n      throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\")\n    }\n\n    itemSource = createCleanTemplateItem(itemSource, list.valueNames)\n\n    createItem = function () {\n      return itemSource.cloneNode(true)\n    }\n  }\n\n  var createCleanTemplateItem = function (templateNode, valueNames) {\n    var el = templateNode.cloneNode(true)\n    el.removeAttribute('id')\n\n    for (var i = 0, il = valueNames.length; i < il; i++) {\n      var elm = undefined,\n        valueName = valueNames[i]\n      if (valueName.data) {\n        for (var j = 0, jl = valueName.data.length; j < jl; j++) {\n          el.setAttribute('data-' + valueName.data[j], '')\n        }\n      } else if (valueName.attr && valueName.name) {\n        elm = list.utils.getByClass(el, valueName.name, true)\n        if (elm) {\n          elm.setAttribute(valueName.attr, '')\n        }\n      } else {\n        elm = list.utils.getByClass(el, valueName, true)\n        if (elm) {\n          elm.innerHTML = ''\n        }\n      }\n    }\n    return el\n  }\n\n  var getFirstListItem = function () {\n    var nodes = list.list.childNodes\n\n    for (var i = 0, il = nodes.length; i < il; i++) {\n      // Only textnodes have a data attribute\n      if (nodes[i].data === undefined) {\n        return nodes[i].cloneNode(true)\n      }\n    }\n    return undefined\n  }\n\n  var getItemSource = function (itemHTML) {\n    if (typeof itemHTML !== 'string') return undefined\n    if (/<tr[\\s>]/g.exec(itemHTML)) {\n      var tbody = document.createElement('tbody')\n      tbody.innerHTML = itemHTML\n      return tbody.firstElementChild\n    } else if (itemHTML.indexOf('<') !== -1) {\n      var div = document.createElement('div')\n      div.innerHTML = itemHTML\n      return div.firstElementChild\n    }\n    return undefined\n  }\n\n  var getValueName = function (name) {\n    for (var i = 0, il = list.valueNames.length; i < il; i++) {\n      var valueName = list.valueNames[i]\n      if (valueName.data) {\n        var data = valueName.data\n        for (var j = 0, jl = data.length; j < jl; j++) {\n          if (data[j] === name) {\n            return { data: name }\n          }\n        }\n      } else if (valueName.attr && valueName.name && valueName.name == name) {\n        return valueName\n      } else if (valueName === name) {\n        return name\n      }\n    }\n  }\n\n  var setValue = function (item, name, value) {\n    var elm = undefined,\n      valueName = getValueName(name)\n    if (!valueName) return\n    if (valueName.data) {\n      item.elm.setAttribute('data-' + valueName.data, value)\n    } else if (valueName.attr && valueName.name) {\n      elm = list.utils.getByClass(item.elm, valueName.name, true)\n      if (elm) {\n        elm.setAttribute(valueName.attr, value)\n      }\n    } else {\n      elm = list.utils.getByClass(item.elm, valueName, true)\n      if (elm) {\n        elm.innerHTML = value\n      }\n    }\n  }\n\n  this.get = function (item, valueNames) {\n    templater.create(item)\n    var values = {}\n    for (var i = 0, il = valueNames.length; i < il; i++) {\n      var elm = undefined,\n        valueName = valueNames[i]\n      if (valueName.data) {\n        for (var j = 0, jl = valueName.data.length; j < jl; j++) {\n          values[valueName.data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueName.data[j])\n        }\n      } else if (valueName.attr && valueName.name) {\n        elm = list.utils.getByClass(item.elm, valueName.name, true)\n        values[valueName.name] = elm ? list.utils.getAttribute(elm, valueName.attr) : ''\n      } else {\n        elm = list.utils.getByClass(item.elm, valueName, true)\n        values[valueName] = elm ? elm.innerHTML : ''\n      }\n    }\n    return values\n  }\n\n  this.set = function (item, values) {\n    if (!templater.create(item)) {\n      for (var v in values) {\n        if (values.hasOwnProperty(v)) {\n          setValue(item, v, values[v])\n        }\n      }\n    }\n  }\n\n  this.create = function (item) {\n    if (item.elm !== undefined) {\n      return false\n    }\n    item.elm = createItem(item.values())\n    templater.set(item, item.values())\n    return true\n  }\n  this.remove = function (item) {\n    if (item.elm.parentNode === list.list) {\n      list.list.removeChild(item.elm)\n    }\n  }\n  this.show = function (item) {\n    templater.create(item)\n    list.list.appendChild(item.elm)\n  }\n  this.hide = function (item) {\n    if (item.elm !== undefined && item.elm.parentNode === list.list) {\n      list.list.removeChild(item.elm)\n    }\n  }\n  this.clear = function () {\n    /* .innerHTML = ''; fucks up IE */\n    if (list.list.hasChildNodes()) {\n      while (list.list.childNodes.length >= 1) {\n        list.list.removeChild(list.list.firstChild)\n      }\n    }\n  }\n\n  init()\n}\n\nmodule.exports = function (list) {\n  return new Templater(list)\n}\n"
  },
  {
    "path": "src/utils/classes.js",
    "content": "/**\n * Module dependencies.\n */\n\nvar index = require('./index-of')\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n  return new ClassList(el)\n}\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n  if (!el || !el.nodeType) {\n    throw new Error('A DOM element reference is required')\n  }\n  this.el = el\n  this.list = el.classList\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function (name) {\n  // classList\n  if (this.list) {\n    this.list.add(name)\n    return this\n  }\n\n  // fallback\n  var arr = this.array()\n  var i = index(arr, name)\n  if (!~i) arr.push(name)\n  this.el.className = arr.join(' ')\n  return this\n}\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function (name) {\n  // classList\n  if (this.list) {\n    this.list.remove(name)\n    return this\n  }\n\n  // fallback\n  var arr = this.array()\n  var i = index(arr, name)\n  if (~i) arr.splice(i, 1)\n  this.el.className = arr.join(' ')\n  return this\n}\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function (name, force) {\n  // classList\n  if (this.list) {\n    if ('undefined' !== typeof force) {\n      if (force !== this.list.toggle(name, force)) {\n        this.list.toggle(name) // toggle again to correct\n      }\n    } else {\n      this.list.toggle(name)\n    }\n    return this\n  }\n\n  // fallback\n  if ('undefined' !== typeof force) {\n    if (!force) {\n      this.remove(name)\n    } else {\n      this.add(name)\n    }\n  } else {\n    if (this.has(name)) {\n      this.remove(name)\n    } else {\n      this.add(name)\n    }\n  }\n\n  return this\n}\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function () {\n  var className = this.el.getAttribute('class') || ''\n  var str = className.replace(/^\\s+|\\s+$/g, '')\n  var arr = str.split(re)\n  if ('' === arr[0]) arr.shift()\n  return arr\n}\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n  return this.list ? this.list.contains(name) : !!~index(this.array(), name)\n}\n"
  },
  {
    "path": "src/utils/events.js",
    "content": "var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n  unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n  prefix = bind !== 'addEventListener' ? 'on' : '',\n  toArray = require('./to-array')\n\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.bind = function (el, type, fn, capture) {\n  el = toArray(el)\n  for (var i = 0, il = el.length; i < il; i++) {\n    el[i][bind](prefix + type, fn, capture || false)\n  }\n}\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.unbind = function (el, type, fn, capture) {\n  el = toArray(el)\n  for (var i = 0, il = el.length; i < il; i++) {\n    el[i][unbind](prefix + type, fn, capture || false)\n  }\n}\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * `wait` milliseconds. If `immediate` is true, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @param {Function} fn\n * @param {Integer} wait\n * @param {Boolean} immediate\n * @api public\n */\n\nexports.debounce = function (fn, wait, immediate) {\n  var timeout\n  return wait\n    ? function () {\n        var context = this,\n          args = arguments\n        var later = function () {\n          timeout = null\n          if (!immediate) fn.apply(context, args)\n        }\n        var callNow = immediate && !timeout\n        clearTimeout(timeout)\n        timeout = setTimeout(later, wait)\n        if (callNow) fn.apply(context, args)\n      }\n    : fn\n}\n"
  },
  {
    "path": "src/utils/extend.js",
    "content": "/*\n * Source: https://github.com/segmentio/extend\n */\n\nmodule.exports = function extend(object) {\n  // Takes an unlimited number of extenders.\n  var args = Array.prototype.slice.call(arguments, 1)\n\n  // For each extender, copy their properties on our object.\n  for (var i = 0, source; (source = args[i]); i++) {\n    if (!source) continue\n    for (var property in source) {\n      object[property] = source[property]\n    }\n  }\n\n  return object\n}\n"
  },
  {
    "path": "src/utils/fuzzy.js",
    "content": "module.exports = function (text, pattern, options) {\n  // Aproximately where in the text is the pattern expected to be found?\n  var Match_Location = options.location || 0\n\n  //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n  var Match_Distance = options.distance || 100\n\n  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n  var Match_Threshold = options.threshold || 0.4\n\n  if (pattern === text) return true // Exact match\n  if (pattern.length > 32) return false // This algorithm cannot be used\n\n  // Set starting location at beginning text and initialise the alphabet.\n  var loc = Match_Location,\n    s = (function () {\n      var q = {},\n        i\n\n      for (i = 0; i < pattern.length; i++) {\n        q[pattern.charAt(i)] = 0\n      }\n\n      for (i = 0; i < pattern.length; i++) {\n        q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1)\n      }\n\n      return q\n    })()\n\n  // Compute and return the score for a match with e errors and x location.\n  // Accesses loc and pattern through being a closure.\n\n  function match_bitapScore_(e, x) {\n    var accuracy = e / pattern.length,\n      proximity = Math.abs(loc - x)\n\n    if (!Match_Distance) {\n      // Dodge divide by zero error.\n      return proximity ? 1.0 : accuracy\n    }\n    return accuracy + proximity / Match_Distance\n  }\n\n  var score_threshold = Match_Threshold, // Highest score beyond which we give up.\n    best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)\n\n  if (best_loc != -1) {\n    score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n    // What about in the other direction? (speedup)\n    best_loc = text.lastIndexOf(pattern, loc + pattern.length)\n\n    if (best_loc != -1) {\n      score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n    }\n  }\n\n  // Initialise the bit arrays.\n  var matchmask = 1 << (pattern.length - 1)\n  best_loc = -1\n\n  var bin_min, bin_mid\n  var bin_max = pattern.length + text.length\n  var last_rd\n  for (var d = 0; d < pattern.length; d++) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from 'loc' we can stray at this\n    // error level.\n    bin_min = 0\n    bin_mid = bin_max\n    while (bin_min < bin_mid) {\n      if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n        bin_min = bin_mid\n      } else {\n        bin_max = bin_mid\n      }\n      bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)\n    }\n    // Use the result from this iteration as the maximum for the next.\n    bin_max = bin_mid\n    var start = Math.max(1, loc - bin_mid + 1)\n    var finish = Math.min(loc + bin_mid, text.length) + pattern.length\n\n    var rd = Array(finish + 2)\n    rd[finish + 1] = (1 << d) - 1\n    for (var j = finish; j >= start; j--) {\n      // The alphabet (s) is a sparse hash, so the following line generates\n      // warnings.\n      var charMatch = s[text.charAt(j - 1)]\n      if (d === 0) {\n        // First pass: exact match.\n        rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n      } else {\n        // Subsequent passes: fuzzy match.\n        rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1]\n      }\n      if (rd[j] & matchmask) {\n        var score = match_bitapScore_(d, j - 1)\n        // This match will almost certainly be better than any existing match.\n        // But check anyway.\n        if (score <= score_threshold) {\n          // Told you so.\n          score_threshold = score\n          best_loc = j - 1\n          if (best_loc > loc) {\n            // When passing loc, don't exceed our current distance from loc.\n            start = Math.max(1, 2 * loc - best_loc)\n          } else {\n            // Already passed loc, downhill from here on in.\n            break\n          }\n        }\n      }\n    }\n    // No hope for a (better) match at greater error levels.\n    if (match_bitapScore_(d + 1, loc) > score_threshold) {\n      break\n    }\n    last_rd = rd\n  }\n\n  return best_loc < 0 ? false : true\n}\n"
  },
  {
    "path": "src/utils/get-attribute.js",
    "content": "/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\n\nmodule.exports = function (el, attr) {\n  var result = (el.getAttribute && el.getAttribute(attr)) || null\n  if (!result) {\n    var attrs = el.attributes\n    var length = attrs.length\n    for (var i = 0; i < length; i++) {\n      if (attrs[i] !== undefined) {\n        if (attrs[i].nodeName === attr) {\n          result = attrs[i].nodeValue\n        }\n      }\n    }\n  }\n  return result\n}\n"
  },
  {
    "path": "src/utils/get-by-class.js",
    "content": "/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\n\nvar getElementsByClassName = function (container, className, single) {\n  if (single) {\n    return container.getElementsByClassName(className)[0]\n  } else {\n    return container.getElementsByClassName(className)\n  }\n}\n\nvar querySelector = function (container, className, single) {\n  className = '.' + className\n  if (single) {\n    return container.querySelector(className)\n  } else {\n    return container.querySelectorAll(className)\n  }\n}\n\nvar polyfill = function (container, className, single) {\n  var classElements = [],\n    tag = '*'\n\n  var els = container.getElementsByTagName(tag)\n  var elsLen = els.length\n  var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)')\n  for (var i = 0, j = 0; i < elsLen; i++) {\n    if (pattern.test(els[i].className)) {\n      if (single) {\n        return els[i]\n      } else {\n        classElements[j] = els[i]\n        j++\n      }\n    }\n  }\n  return classElements\n}\n\nmodule.exports = (function () {\n  return function (container, className, single, options) {\n    options = options || {}\n    if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {\n      return getElementsByClassName(container, className, single)\n    } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {\n      return querySelector(container, className, single)\n    } else {\n      return polyfill(container, className, single)\n    }\n  }\n})()\n"
  },
  {
    "path": "src/utils/index-of.js",
    "content": "var indexOf = [].indexOf\n\nmodule.exports = function(arr, obj){\n  if (indexOf) return arr.indexOf(obj);\n  for (var i = 0, il = arr.length; i < il; ++i) {\n    if (arr[i] === obj) return i;\n  }\n  return -1\n}\n"
  },
  {
    "path": "src/utils/to-array.js",
    "content": "/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\n\nmodule.exports = function toArray(collection) {\n  if (typeof collection === 'undefined') return []\n  if (collection === null) return [null]\n  if (collection === window) return [window]\n  if (typeof collection === 'string') return [collection]\n  if (isArray(collection)) return collection\n  if (typeof collection.length != 'number') return [collection]\n  if (typeof collection === 'function' && collection instanceof Function) return [collection]\n\n  var arr = [];\n  for (var i = 0, il = collection.length; i < il; i++) {\n    if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n      arr.push(collection[i])\n    }\n  }\n  if (!arr.length) return []\n  return arr\n}\n\nfunction isArray(arr) {\n  return Object.prototype.toString.call(arr) === '[object Array]'\n}\n"
  },
  {
    "path": "src/utils/to-string.js",
    "content": "module.exports = function (s) {\n  s = s === undefined ? '' : s\n  s = s === null ? '' : s\n  s = s.toString()\n  return s\n}\n"
  },
  {
    "path": "webpack.config.js",
    "content": "const webpack = require('webpack')\nconst PACKAGE = require('./package.json')\nconst TerserPlugin = require('terser-webpack-plugin')\n\nmodule.exports = {\n  entry: {\n    list: './src/index.js',\n    'list.min': './src/index.js',\n  },\n  output: {\n    path: __dirname + '/dist',\n    filename: '[name].js',\n    library: 'List',\n  },\n  devtool: 'cheap-module-source-map',\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /(node_modules)/,\n        use: {\n          loader: 'babel-loader',\n          options: {\n            presets: ['@babel/preset-env'],\n          },\n        },\n      },\n    ],\n  },\n  devServer: {\n    inline: true,\n  },\n  plugins: [],\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new TerserPlugin({\n        include: /\\.min\\.js$/,\n        extractComments: false,\n        terserOptions: {\n          format: {\n            comments: /^! List.js v.*/,\n          },\n          mangle: true,\n        },\n      }),\n    ],\n  },\n}\n"
  }
]