{"_id":"unpack-element","_rev":"31-fe66b93b182392e72f5adebbfd7f5e2a","name":"unpack-element","description":"unpack an element's children based on their id","dist-tags":{"latest":"2.2.1"},"versions":{"0.0.1":{"name":"unpack-element","version":"0.0.1","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on their id\n\n## Example\n\nTake a dom element and unpack it into it's children based on their ids\n\n```\n<div>\n    <ul id=\"list\">\n    </ul>\n    <span id=\"foo\"></span>\n</div>\n```\n\n```\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\nunpack removes the id attributes from the child nodes. This is useful if your\ntemplate generates a dom element with common ids in it and you want to have\naccess to those \"named\" children inside your template without having global\nid's in your DOM\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced","_id":"unpack-element@0.0.1","dist":{"shasum":"06d07a9cf3589198e5a54de22f5dc6c557634d00","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-0.0.1.tgz","integrity":"sha512-TyWA++vLRUooImdHQJOhGtbLoxbxhcrK6fdhVztoidvfr1OcAmUb6EYhZppH6KfTHWBMzCicYsqIzfSLZcQwfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6AsZ+dQRW3m64m4F8Fu9Sl/J6St/WySpynK7pS5PjkAiEAt4SW+mYH9iGuJP7+3w1NWrl7K1CuSt1yXEubIcEpgWM="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"0.1.0":{"name":"unpack-element","version":"0.1.0","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on their id\n\n## Example\n\nTake a dom element and unpack it into it's children based on their ids\n\n```\n<div>\n    <ul id=\"list\">\n    </ul>\n    <span id=\"foo\"></span>\n</div>\n```\n\n```\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\nunpack removes the id attributes from the child nodes. This is useful if your\ntemplate generates a dom element with common ids in it and you want to have\naccess to those \"named\" children inside your template without having global\nid's in your DOM\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced","_id":"unpack-element@0.1.0","dist":{"shasum":"4d18b6200aed3533e87086744a0dd0af61528d17","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-0.1.0.tgz","integrity":"sha512-zFMRf2dNiWTaTuoYG/qFekEx3+C6jXSbJg3P5yLL9itep9yFmbCafdHrhpAVz6wIczC+Q1bRQHoTn1daKlIdHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnnxD1IKK3ZxM3lbfuPCoBcsOBzDszlaEW28/rNIZSnQIhAN0x0UoXfi38whl68CuMFwrtIgdQzTToYLz9T18yBnls"}]},"_npmVersion":"1.1.49","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"0.2.0":{"name":"unpack-element","version":"0.2.0","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1","for-each":"~0.1.0"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on their id\n\n## Example\n\nTake a dom element and unpack it into it's children based on their ids\n\nThe ids are removed so you avoid naming collisions at the global level.\n\n```html\n<div>\n    <ul id=\"list\">\n    </ul>\n    <span id=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\nunpack removes the id attributes from the child nodes. This is useful if your\ntemplate generates a dom element with common ids in it and you want to have\naccess to those \"named\" children inside your template without having global\nid's in your DOM.\n\nYou don't want those IDs in your document anyway since generally\n\n - it's bad to use ids for CSS selection\n - you can use `<a name=\"identifier></a>` if you want fragment identifiers.\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\"\n    , foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","_id":"unpack-element@0.2.0","dist":{"shasum":"b1a5c238bdb395a4d62286a4d15453ca64f73aef","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-0.2.0.tgz","integrity":"sha512-dPqGuk/UKC9DNfyzJp5OEZIK+LeH6t7adwWBzdfDM0E68FpT9MbeufiOfwpO3NPFSkb16eglm4zcPDkC1Bnb3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtRk4EWcRbA9QxqMrYY6Ixsd2mUdX7Uf4F0npOFbJ+BAiEAnk2/46xmmRdn8+QvPbjp+9tlgurKgnYqY1JssXnF8DE="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"0.2.1":{"name":"unpack-element","version":"0.2.1","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1","for-each":"~0.1.0"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on their id\n\n## Example\n\nTake a dom element and unpack it into it's children based on their ids\n\nThe ids are removed so you avoid naming collisions at the global level.\n\n```html\n<div>\n    <ul id=\"list\">\n    </ul>\n    <span id=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\nunpack removes the id attributes from the child nodes. This is useful if your\ntemplate generates a dom element with common ids in it and you want to have\naccess to those \"named\" children inside your template without having global\nid's in your DOM.\n\nYou don't want those IDs in your document anyway since generally\n\n - it's bad to use ids for CSS selection\n - you can use `<a name=\"identifier></a>` if you want fragment identifiers.\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\"\n    , foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","_id":"unpack-element@0.2.1","dist":{"shasum":"7eb8f592792ab34fc131e36ae8e775b460ebf02e","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-0.2.1.tgz","integrity":"sha512-u8lVV53IbR81jYv3axRYHTFMda/8Q8YcKFhyNNRwZpi/3Zla3achMKbahmLeSxVyQp0wK+8Dsui8StqSdUeUfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQH+QdrtMd9KmlOnhGpTfQ6BQRHytwUDWsj+1+3v4QxgIhANpNvDeF7MTvl//xmD+bqU9w2NgxhCwk7t00oXEUG+Sb"}]},"_npmVersion":"1.1.49","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.0.0":{"name":"unpack-element","version":"1.0.0","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1","for-each":"~0.1.0"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\"\n    , foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","readmeFilename":"README.md","_id":"unpack-element@1.0.0","dist":{"shasum":"88fb934e477738c97fe16b55bb9921a54e468478","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.0.0.tgz","integrity":"sha512-/IUc/5ItYNmMJoKE9DSuXhH0njSXUdvQ7sl7VwaZx+USlWUx7Bdp/9ZKqXIrGRXu1ypXMuxrG3tK/Sa3rv6gnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTDE4oJVVr9OW4JMhiBaD60zmBrSjrUiiCfj+7D9P92AiEApMML7zK8O///Y+DdyRUwQg9T5Zcpmh+orm0twt01xYg="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.0.1":{"name":"unpack-element","version":"1.0.1","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1","for-each":"~0.1.0","dotty":"0.0.1"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\"\n    , foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","readmeFilename":"README.md","_id":"unpack-element@1.0.1","dist":{"shasum":"2f3533a616ad1e60d34ace04a29f786dbcd746f6","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.0.1.tgz","integrity":"sha512-6ms6aPYs21HATj9JNyir3lGWUeEienSskEga4RgKrCI3FIixdQuj75O6iMU5jBVrDnNdvriA3/OSE0KACWnvEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWYuSDZQmfQQISccIf8rzbCgpX795oRIm2cYlfrjiTOQIhAJuDxzeXXBrJ1ORUeEn9vKuj1g0gZzKP0f5E6o4hoJJk"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.0.2":{"name":"unpack-element","version":"1.0.2","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1","for-each":"~0.1.0","dotty":"0.0.1"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\"\n    , foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","readmeFilename":"README.md","_id":"unpack-element@1.0.2","dist":{"shasum":"fed897eab11abb96d1cf13b7b7990c2f0c1f6e73","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.0.2.tgz","integrity":"sha512-HTs1YlWg6y0EbAsoJ3NJRaWoqDLlgG1GfNk9bEge+G/3m5uHl2aNp1Yms5dhA7GW5ppfLVaZQR5H1fn/QUUh2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhfjKUnP66q3/KH8SyC7XY0cxkuWXJG1kufZMvHfbdDAiEAiCv0WuNQZOoiYyXd8XrY2fSEley2FIMUnfCyM4fYFwg="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.0.3":{"name":"unpack-element","version":"1.0.3","description":"unpack an element's children based on their id","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dom-walk":"0.0.1","for-each":"~0.1.0","dotty":"0.0.1","data-set":"~0.1.1"},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{},"readme":"# unpack-element\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\"\n    , foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","readmeFilename":"README.md","_id":"unpack-element@1.0.3","dist":{"shasum":"25d05948dcff5278abb3736be4b14a92b14df976","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.0.3.tgz","integrity":"sha512-lGiJWUnmZ0xXvT+brFxMq8qjJ95YhulHHUDzAEDwLwd48lx4Q+1HmOYrmaW03X/LjuHsE1nKxA2yf7mw2xLg2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHbPpLCwP/4Z4ZeRtBQgrXtYjkPv6KCC1ezaAf+47CQvAiEA9qHngmJy7qze7rjkZGk05d/wuKyGX8thRy996cZcmVg="}]},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.1.1":{"name":"unpack-element","version":"1.1.1","description":"unpack an element's children based on their id","keywords":["unpack","dom","template","element"],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dotty":"~0.0.2","data-set":"~0.1.1"},"devDependencies":{"tape":"~1.0.2","jsonml-stringify":"~0.1.8"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unpack-element\n\n[![browser support][5]][6]\n\n[![build status][1]][2] [![NPM version][7]][8] [![dependency status][3]][4]\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with root markers\n\nIf you have server side generated DOM your page may be generated\n    with multiple templates which each use unpack-element to\n    extract their nodes. Ideally your top call to unpack-element\n    won't recursively unpack every sub template as you only\n    care about the top layer.\n\n```html\n<body>\n    <div data-rootmarker=\"thingList\">\n        <ul data-marker=\"list\">\n        </ul>\n        <span data-marker=\"foo\"></span>\n    </div>\n    <div data-rootmarker=\"otherList\">\n        <ol data-marker=\"list\">\n        </ol>\n        <span data-marker=\"bar\"></span>\n    </div>\n</body>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(document.body)\nelements.thingList // that div\nelements.otherList // that other div\nelements.root // document.body\n\nvar childElems = unpack(elements.thingList)\nchildElems.root // that div\nchildElems.list // that ul\nchildElems.foo // that span\n```\n\nWhen unpack reaches a `data-rootmarker` instead of a `data-marker`\n    it will store that elem on the returned object with the\n    marker but not recurse into it's children.\n\nThis strategy also works well for lists of sub elements where\n    you want to only to fetch the root element of each sub\n    template\n\n```html\n<div>\n    <ul data-marker=\"list\">\n        <li data-rootmarker=\"listItems.1\">\n            <span>Item 1</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n        <li data-rootmarker=\"listItems.2\">\n            <span>Item 2</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.list // that ul\nelements.foo // that span\nelements.listItems /* {\n    1: thatFirstLi,\n    2: thatSecondLi\n} */\n\nvar firstSubTemplate = unpack(elements.listItems.1)\nfirstSubTemplate.remove // that button\n```\n\nThis style of using `data-rootmarker` allows you to unpack\n    an entirely pre-rendered tree of templates and sub\n    templates without having to worry about name collisions\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\",\n    foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/unpack-element.png\n  [2]: https://travis-ci.org/Raynos/unpack-element\n  [3]: https://david-dm.org/Raynos/unpack-element.png\n  [4]: https://david-dm.org/Raynos/unpack-element\n  [5]: https://ci.testling.com/Raynos/unpack-element.png\n  [6]: https://ci.testling.com/Raynos/unpack-element\n  [7]: https://badge.fury.io/js/unpack-element.png\n  [8]: https://badge.fury.io/js/unpack-element\n","readmeFilename":"README.md","_id":"unpack-element@1.1.1","dist":{"shasum":"3e45be6604a8e03240dc282ddf8ddbb4a5fd0c3e","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.1.1.tgz","integrity":"sha512-xzS5SKjB5yCNku0MQcdo5pHOLxUHdNXedQlbHJip2PYo7VTo49rPxBeZfUisWN5m43Qa6MKxJBtqQdfCfx1X0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxvpgh4F6RwXNGRhSMNJ8znk71/1QQ4QTcv0EidvtRPAiBfExUOcPxkxto8EuqFLOZDivDLpLTHfU4mLa1/iHLyvQ=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.1.2":{"name":"unpack-element","version":"1.1.2","description":"unpack an element's children based on their id","keywords":["unpack","dom","template","element"],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dotty":"~0.0.2","data-set":"~0.2.2"},"devDependencies":{"tape":"~1.0.2","jsonml-stringify":"~0.1.8"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unpack-element\n\n[![browser support][5]][6]\n\n<!-- [![build status][1]][2]  -->\n[![NPM version][7]][8] [![dependency status][3]][4]\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with root markers\n\nIf you have server side generated DOM your page may be generated\n    with multiple templates which each use unpack-element to\n    extract their nodes. Ideally your top call to unpack-element\n    won't recursively unpack every sub template as you only\n    care about the top layer.\n\n```html\n<body>\n    <div data-rootmarker=\"thingList\">\n        <ul data-marker=\"list\">\n        </ul>\n        <span data-marker=\"foo\"></span>\n    </div>\n    <div data-rootmarker=\"otherList\">\n        <ol data-marker=\"list\">\n        </ol>\n        <span data-marker=\"bar\"></span>\n    </div>\n</body>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(document.body)\nelements.thingList // that div\nelements.otherList // that other div\nelements.root // document.body\n\nvar childElems = unpack(elements.thingList)\nchildElems.root // that div\nchildElems.list // that ul\nchildElems.foo // that span\n```\n\nWhen unpack reaches a `data-rootmarker` instead of a `data-marker`\n    it will store that elem on the returned object with the\n    marker but not recurse into it's children.\n\nThis strategy also works well for lists of sub elements where\n    you want to only to fetch the root element of each sub\n    template\n\n```html\n<div>\n    <ul data-marker=\"list\">\n        <li data-rootmarker=\"listItems.1\">\n            <span>Item 1</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n        <li data-rootmarker=\"listItems.2\">\n            <span>Item 2</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.list // that ul\nelements.foo // that span\nelements.listItems /* {\n    1: thatFirstLi,\n    2: thatSecondLi\n} */\n\nvar firstSubTemplate = unpack(elements.listItems.1)\nfirstSubTemplate.remove // that button\n```\n\nThis style of using `data-rootmarker` allows you to unpack\n    an entirely pre-rendered tree of templates and sub\n    templates without having to worry about name collisions\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\",\n    foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/unpack-element.png\n  [2]: https://travis-ci.org/Raynos/unpack-element\n  [3]: https://david-dm.org/Raynos/unpack-element.png\n  [4]: https://david-dm.org/Raynos/unpack-element\n  [5]: https://ci.testling.com/Raynos/unpack-element.png\n  [6]: https://ci.testling.com/Raynos/unpack-element\n  [7]: https://badge.fury.io/js/unpack-element.png\n  [8]: https://badge.fury.io/js/unpack-element\n","readmeFilename":"README.md","_id":"unpack-element@1.1.2","dist":{"shasum":"4bf553fbabf3e0e623c5f5465b69c2af3ee53677","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.1.2.tgz","integrity":"sha512-1liaOrZFZn0r24XQrnJxcWkha3MdMvHSVG1+RFjBDliBXCcUrfAhjPL3RP2Z5OXzvEH1lPzP3dFrh7+WN5FxiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7Rxke1i+RicMRaK+T1x+FbYrDAyerJX4G8wZUj09jggIgR1XJz2Pb3V4Ba+NR6fAC2xVs4l+uv4X+vnKP4JPWBMc="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"1.1.3":{"name":"unpack-element","version":"1.1.3","description":"unpack an element's children based on their id","keywords":["unpack","dom","template","element"],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dotty":"~0.0.2","data-set":"~0.2.2"},"devDependencies":{"tape":"~1.0.2","jsonml-stringify":"~0.1.8"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unpack-element\n\n[![browser support][5]][6]\n\n<!-- [![build status][1]][2]  -->\n[![NPM version][7]][8] [![dependency status][3]][4]\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with root markers\n\nIf you have server side generated DOM your page may be generated\n    with multiple templates which each use unpack-element to\n    extract their nodes. Ideally your top call to unpack-element\n    won't recursively unpack every sub template as you only\n    care about the top layer.\n\n```html\n<body>\n    <div data-rootmarker=\"thingList\">\n        <ul data-marker=\"list\">\n        </ul>\n        <span data-marker=\"foo\"></span>\n    </div>\n    <div data-rootmarker=\"otherList\">\n        <ol data-marker=\"list\">\n        </ol>\n        <span data-marker=\"bar\"></span>\n    </div>\n</body>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(document.body)\nelements.thingList // that div\nelements.otherList // that other div\nelements.root // document.body\n\nvar childElems = unpack(elements.thingList)\nchildElems.root // that div\nchildElems.list // that ul\nchildElems.foo // that span\n```\n\nWhen unpack reaches a `data-rootmarker` instead of a `data-marker`\n    it will store that elem on the returned object with the\n    marker but not recurse into it's children.\n\nThis strategy also works well for lists of sub elements where\n    you want to only to fetch the root element of each sub\n    template\n\n```html\n<div>\n    <ul data-marker=\"list\">\n        <li data-rootmarker=\"listItems.1\">\n            <span>Item 1</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n        <li data-rootmarker=\"listItems.2\">\n            <span>Item 2</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.list // that ul\nelements.foo // that span\nelements.listItems /* {\n    1: thatFirstLi,\n    2: thatSecondLi\n} */\n\nvar firstSubTemplate = unpack(elements.listItems.1)\nfirstSubTemplate.remove // that button\n```\n\nThis style of using `data-rootmarker` allows you to unpack\n    an entirely pre-rendered tree of templates and sub\n    templates without having to worry about name collisions\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\",\n    foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/unpack-element.png\n  [2]: https://travis-ci.org/Raynos/unpack-element\n  [3]: https://david-dm.org/Raynos/unpack-element.png\n  [4]: https://david-dm.org/Raynos/unpack-element\n  [5]: https://ci.testling.com/Raynos/unpack-element.png\n  [6]: https://ci.testling.com/Raynos/unpack-element\n  [7]: https://badge.fury.io/js/unpack-element.png\n  [8]: https://badge.fury.io/js/unpack-element\n","readmeFilename":"README.md","_id":"unpack-element@1.1.3","dist":{"shasum":"bac2c3e414e7184d2f04888b5eb9717044273b5f","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-1.1.3.tgz","integrity":"sha512-+19btu4sTSAKQBZcNW9nchYy1S5x2x1xDuprRU+MKdhUiTBOPsihuDZFfMqPGUsBwerZ5CtAiYuCn/Frb+K8dA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE2kLEw/L51RpNHdBF45I/3HXzHNR13nOZtdRaL2HQ50AiAmbxUFMz6lL6lyQu9GuYA/gdKGJ/qmjGId6NDPx7lz3w=="}]},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"2.0.1":{"name":"unpack-element","version":"2.0.1","description":"unpack an element's children based on their id","keywords":["unpack","dom","template","element"],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dotty":"~0.0.2","data-set":"~0.2.2"},"devDependencies":{"tape":"~1.0.2","jsonml-stringify":"~0.1.8","testling":"~1.1.0"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unpack-element\n\n[![browser support][5]][6]\n\n<!-- [![build status][1]][2]  -->\n[![NPM version][7]][8] [![dependency status][3]][4]\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with root markers\n\nIf you have server side generated DOM your page may be generated\n    with multiple templates which each use unpack-element to\n    extract their nodes. Ideally your top call to unpack-element\n    won't recursively unpack every sub template as you only\n    care about the top layer.\n\n```html\n<body>\n    <div data-rootmarker=\"thingList\">\n        <ul data-marker=\"list\">\n        </ul>\n        <span data-marker=\"foo\"></span>\n    </div>\n    <div data-rootmarker=\"otherList\">\n        <ol data-marker=\"list\">\n        </ol>\n        <span data-marker=\"bar\"></span>\n    </div>\n</body>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(document.body)\nelements.thingList // that div\nelements.otherList // that other div\nelements.root // document.body\n\nvar childElems = unpack(elements.thingList)\nchildElems.root // that div\nchildElems.list // that ul\nchildElems.foo // that span\n```\n\nWhen unpack reaches a `data-rootmarker` instead of a `data-marker`\n    it will store that elem on the returned object with the\n    marker but not recurse into it's children.\n\nThis strategy also works well for lists of sub elements where\n    you want to only to fetch the root element of each sub\n    template\n\n```html\n<div>\n    <ul data-marker=\"list\">\n        <li data-rootmarker=\"listItems.1\">\n            <span>Item 1</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n        <li data-rootmarker=\"listItems.2\">\n            <span>Item 2</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.list // that ul\nelements.foo // that span\nelements.listItems /* {\n    1: thatFirstLi,\n    2: thatSecondLi\n} */\n\nvar firstSubTemplate = unpack(elements.listItems.1)\nfirstSubTemplate.remove // that button\n```\n\nThis style of using `data-rootmarker` allows you to unpack\n    an entirely pre-rendered tree of templates and sub\n    templates without having to worry about name collisions\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\",\n    foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/unpack-element.png\n  [2]: https://travis-ci.org/Raynos/unpack-element\n  [3]: https://david-dm.org/Raynos/unpack-element.png\n  [4]: https://david-dm.org/Raynos/unpack-element\n  [5]: https://ci.testling.com/Raynos/unpack-element.png\n  [6]: https://ci.testling.com/Raynos/unpack-element\n  [7]: https://badge.fury.io/js/unpack-element.png\n  [8]: https://badge.fury.io/js/unpack-element\n","readmeFilename":"README.md","_id":"unpack-element@2.0.1","dist":{"shasum":"d8ea3f862d078e89693976169d45f3efcb259894","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-2.0.1.tgz","integrity":"sha512-igqxKW+Kvk3HWYDHnEOfzmRvjZnQfwXt5z/XveM1x9TJ6fjrqpEaWVrrtZD+wvj/Z7nPefiKhUICUZHkZtFEeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtb7r4DKVlvc+ntMtcvhI2IbNJrZyvhwNNLrWXcD6QSwIgaDmQ/ZYDH2NCY0ARtuIxb6/174SdRQCIhO5L9WZhdr8="}]},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"2.1.1":{"name":"unpack-element","version":"2.1.1","description":"unpack an element's children based on their id","keywords":["unpack","dom","template","element"],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dotty":"~0.0.2","data-set":"~0.2.2"},"devDependencies":{"tape":"~1.0.2","jsonml-stringify":"~0.1.8","testling":"~1.1.0"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unpack-element\n\n[![browser support][5]][6]\n\n<!-- [![build status][1]][2]  -->\n[![NPM version][7]][8] [![dependency status][3]][4]\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with root markers\n\nIf you have server side generated DOM your page may be generated\n    with multiple templates which each use unpack-element to\n    extract their nodes. Ideally your top call to unpack-element\n    won't recursively unpack every sub template as you only\n    care about the top layer.\n\n```html\n<body>\n    <div data-rootmarker=\"thingList\">\n        <ul data-marker=\"list\">\n        </ul>\n        <span data-marker=\"foo\"></span>\n    </div>\n    <div data-rootmarker=\"otherList\">\n        <ol data-marker=\"list\">\n        </ol>\n        <span data-marker=\"bar\"></span>\n    </div>\n</body>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(document.body)\nelements.thingList // that div\nelements.otherList // that other div\nelements.root // document.body\n\nvar childElems = unpack(elements.thingList)\nchildElems.root // that div\nchildElems.list // that ul\nchildElems.foo // that span\n```\n\nWhen unpack reaches a `data-rootmarker` instead of a `data-marker`\n    it will store that elem on the returned object with the\n    marker but not recurse into it's children.\n\nThis strategy also works well for lists of sub elements where\n    you want to only to fetch the root element of each sub\n    template\n\n```html\n<div>\n    <ul data-marker=\"list\">\n        <li data-rootmarker=\"listItems.1\">\n            <span>Item 1</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n        <li data-rootmarker=\"listItems.2\">\n            <span>Item 2</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.list // that ul\nelements.foo // that span\nelements.listItems /* {\n    1: thatFirstLi,\n    2: thatSecondLi\n} */\n\nvar firstSubTemplate = unpack(elements.listItems.1)\nfirstSubTemplate.remove // that button\n```\n\nThis style of using `data-rootmarker` allows you to unpack\n    an entirely pre-rendered tree of templates and sub\n    templates without having to worry about name collisions\n\n## Example with array syntax\n\n```html\n<div>\n    <button class=\"foo\" data-marker=\"buttons[]\"></button>\n    <button class=\"bar\" data-marker=\"buttons[]\"></button>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\n\nelements.buttons // [button.foo, button.bar]\n```\n\nYou can use `[]` syntax to mark that element as being part of\n    an array. This means that the property on the return object\n    will always be an array even if there is only one element\n    with the `buttons[]` data-marker\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\",\n    foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/unpack-element.png\n  [2]: https://travis-ci.org/Raynos/unpack-element\n  [3]: https://david-dm.org/Raynos/unpack-element.png\n  [4]: https://david-dm.org/Raynos/unpack-element\n  [5]: https://ci.testling.com/Raynos/unpack-element.png\n  [6]: https://ci.testling.com/Raynos/unpack-element\n  [7]: https://badge.fury.io/js/unpack-element.png\n  [8]: https://badge.fury.io/js/unpack-element\n","readmeFilename":"README.md","_id":"unpack-element@2.1.1","dist":{"shasum":"86ddb90b7874287593d962f9c64bc483d72f02a2","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-2.1.1.tgz","integrity":"sha512-iSqnR6dAkptVnG32IpMJy4VsjrEG0PJz7B+euwAsttn6PLgd+Nfp0DIsFM9m9lEKUpWNfGiQGF4vy3udXURLyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmxgCky+4d0B26CcFwCyNmHCKC0AOYxQm3w0iwjazfqQIhAOWjswWmevs8u44W87fdofW1IdlHcbveWpD9oatfKiEQ"}]},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]},"2.2.1":{"name":"unpack-element","version":"2.2.1","description":"unpack an element's children based on their id","keywords":["unpack","dom","template","element"],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"},"main":"index","homepage":"https://github.com/Raynos/unpack-element","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/unpack-element/issues","email":"raynos2@gmail.com"},"dependencies":{"dotty":"~0.0.2","data-set":"~0.2.2"},"devDependencies":{"tape":"~1.0.2","jsonml-stringify":"~0.1.8","testling":"~1.1.0"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/unpack-element/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unpack-element\n\n[![browser support][5]][6]\n\n<!-- [![build status][1]][2]  -->\n[![NPM version][7]][8] [![dependency status][3]][4]\n\nunpack an element's children based on markers\n\n## Example\n\nTake a dom element and unpack it into it's children based on their markers\n\n```html\n<div>\n    <ul data-marker=\"list\">\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Example with root markers\n\nIf you have server side generated DOM your page may be generated\n    with multiple templates which each use unpack-element to\n    extract their nodes. Ideally your top call to unpack-element\n    won't recursively unpack every sub template as you only\n    care about the top layer.\n\n```html\n<body>\n    <div data-rootmarker=\"thingList\">\n        <ul data-marker=\"list\">\n        </ul>\n        <span data-marker=\"foo\"></span>\n    </div>\n    <div data-rootmarker=\"otherList\">\n        <ol data-marker=\"list\">\n        </ol>\n        <span data-marker=\"bar\"></span>\n    </div>\n</body>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(document.body)\nelements.thingList // that div\nelements.otherList // that other div\nelements.root // document.body\n\nvar childElems = unpack(elements.thingList)\nchildElems.root // that div\nchildElems.list // that ul\nchildElems.foo // that span\n```\n\nWhen unpack reaches a `data-rootmarker` instead of a `data-marker`\n    it will store that elem on the returned object with the\n    marker but not recurse into it's children.\n\nThis strategy also works well for lists of sub elements where\n    you want to only to fetch the root element of each sub\n    template\n\n```html\n<div>\n    <ul data-marker=\"list\">\n        <li data-rootmarker=\"listItems.1\">\n            <span>Item 1</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n        <li data-rootmarker=\"listItems.2\">\n            <span>Item 2</span>\n            <button data-marker=\"remove\">X</button>\n        </li>\n    </ul>\n    <span data-marker=\"foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.list // that ul\nelements.foo // that span\nelements.listItems /* {\n    1: thatFirstLi,\n    2: thatSecondLi\n} */\n\nvar firstSubTemplate = unpack(elements.listItems.1)\nfirstSubTemplate.remove // that button\n```\n\nThis style of using `data-rootmarker` allows you to unpack\n    an entirely pre-rendered tree of templates and sub\n    templates without having to worry about name collisions\n\n## Example with array syntax\n\n```html\n<div>\n    <button class=\"foo\" data-marker=\"buttons[]\"></button>\n    <button class=\"bar\" data-marker=\"buttons[]\"></button>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\n\nelements.buttons // [button.foo, button.bar]\n```\n\nYou can use `[]` syntax to mark that element as being part of\n    an array. This means that the property on the return object\n    will always be an array even if there is only one element\n    with the `buttons[]` data-marker\n\n## Example with class mapping\n\n```html\n<div>\n    <ul class=\"apples-list\">\n    </ul>\n    <span class=\"apple-foo\"></span>\n</div>\n```\n\n```js\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv, {\n    list: \"apples-list\",\n    foo: \"apple-foo\"\n})\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/unpack-element.png\n  [2]: https://travis-ci.org/Raynos/unpack-element\n  [3]: https://david-dm.org/Raynos/unpack-element.png\n  [4]: https://david-dm.org/Raynos/unpack-element\n  [5]: https://ci.testling.com/Raynos/unpack-element.png\n  [6]: https://ci.testling.com/Raynos/unpack-element\n  [7]: https://badge.fury.io/js/unpack-element.png\n  [8]: https://badge.fury.io/js/unpack-element\n","readmeFilename":"README.md","_id":"unpack-element@2.2.1","dist":{"shasum":"4b19a451257f989e1943f6615f706c06c1eefbb1","tarball":"https://registry.npmjs.org/unpack-element/-/unpack-element-2.2.1.tgz","integrity":"sha512-RZNno6MAjgcMplcwe57CWoLAHbZ3uXHwFNWslBrNosCiuBHxE/hZM7snTg3q7tsPmjnQ7EEDVx4LbdIsMPJVFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTGTQhiRYnlHQttKY0sDos+lbMof5F7ZeA2bF4ZQXWUAiEArpW/OmSHNEng5N5HcXsFWU59XEOtkN2f8k/ru2fDcpg="}]},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}]}},"readme":"# unpack-element\n\nunpack an element's children based on their id\n\n## Example\n\nTake a dom element and unpack it into it's children based on their ids\n\n```\n<div>\n    <ul id=\"list\">\n    </ul>\n    <span id=\"foo\"></span>\n</div>\n```\n\n```\nvar unpack = require(\"unpack-element\")\n\nvar elements = unpack(thatDiv)\nelements.root // that div\nelements.list // that ul\nelements.foo // that span\n```\n\nunpack removes the id attributes from the child nodes. This is useful if your\ntemplate generates a dom element with common ids in it and you want to have\naccess to those \"named\" children inside your template without having global\nid's in your DOM\n\n## Installation\n\n`npm install unpack-element`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced","maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}],"time":{"modified":"2022-06-28T05:13:26.981Z","created":"2012-09-17T14:02:54.144Z","0.0.1":"2012-09-17T14:02:56.002Z","0.1.0":"2012-10-07T06:20:38.435Z","0.2.0":"2012-11-06T22:41:32.979Z","0.2.1":"2012-11-06T22:43:06.951Z","1.0.0":"2013-01-11T00:32:43.456Z","1.0.1":"2013-01-16T03:35:08.118Z","1.0.2":"2013-01-16T03:41:32.017Z","1.0.3":"2013-01-29T23:30:39.231Z","1.1.1":"2013-06-02T00:54:25.386Z","1.1.2":"2013-06-02T01:19:41.857Z","1.1.3":"2013-06-19T04:27:00.055Z","2.0.1":"2013-07-02T22:08:06.866Z","2.1.1":"2013-07-06T00:59:15.145Z","2.2.1":"2013-07-06T01:04:46.719Z"},"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/unpack-element.git"}}