{"_id":"catberry-lazy-loader","_rev":"45-ff699fcb3e469ee4551f087fded2bd97","name":"catberry-lazy-loader","description":"Lazy loader and infinite scroll for Catberry modules","dist-tags":{"latest":"2.0.8"},"versions":{"0.6.0":{"name":"catberry-lazy-loader","version":"0.6.0","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Feed lazy loader for catberry modules","homepage":"https://github.com/pragmadash/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/pragmadash/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/pragmadash/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"jsdom":"~0.10.5","jquery":"~2.1.1","catberry-locator":"~0.4.0","mocha":"~1.19.0","jscs":"~1.4.5","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"jshint ./ && jscs ./** && mocha --recursive"},"licenses":[{"type":"MIT","url":"https://github.com/pragmadash/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"e371f5a23c6ba15115cff99d878c12796ff81f1c","_id":"catberry-lazy-loader@0.6.0","_shasum":"a90bc1660dee6fac40ba2edd403774256dca0235","_from":".","_npmVersion":"1.4.11","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"a90bc1660dee6fac40ba2edd403774256dca0235","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-0.6.0.tgz","integrity":"sha512-Rf9ysJ0eqZXzTlm3hXEleMaSZAbaiO6G+WeOdbE31JD/4nBV7y1BP4iT33XMzqPLlCNej3HzZ5g7psVbtBAu8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA8ATk5tMGjo+xfiFdR8jthsA31oONjhlqMfhnmhYqnOAiEAmDOiGeUF8ODkXrjxSHX+Cb5eNy8ZgpSjyu2xpZ6D6zE="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"0.6.1":{"name":"catberry-lazy-loader","version":"0.6.1","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Feed lazy loader for catberry modules","homepage":"https://github.com/pragmadash/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/pragmadash/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/pragmadash/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"jsdom":"~0.10.5","jquery":"~2.1.1","catberry-locator":"~0.4.0","mocha":"~1.19.0","jscs":"~1.4.5","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"jshint ./ && jscs ./** && mocha --recursive"},"licenses":[{"type":"MIT","url":"https://github.com/pragmadash/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"664c28f95c302cee6a57dcf66063b8ae88be1fad","_id":"catberry-lazy-loader@0.6.1","_shasum":"048a82189f914baccad9523c50e3d339ec0886f0","_from":".","_npmVersion":"1.4.11","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"048a82189f914baccad9523c50e3d339ec0886f0","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-0.6.1.tgz","integrity":"sha512-K2wDyEId+A7gcpDyjLWDIzxDKShXVi5iOqYFUdZmL8HFx+953i0m9prjDtkB1QjeI0EzZYo8s/yBne7g60xToQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCktNTDLvkl5gKCN1CGz20/KIluK6k+ncrc8Zi9QnxabAIhAOnxJA3o1IROuu/VTIB8FL+pVKJ8CeDlPNd8jdcuPJDz"}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"0.6.2":{"name":"catberry-lazy-loader","version":"0.6.2","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Feed lazy loader for catberry modules","homepage":"https://github.com/pragmadash/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/pragmadash/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/pragmadash/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"jsdom":"~0.10.5","jquery":"~2.1.1","catberry-locator":"~0.4.0","mocha":"~1.19.0","jscs":"~1.4.5","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"jshint ./ && jscs ./** && mocha --recursive"},"licenses":[{"type":"MIT","url":"https://github.com/pragmadash/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"96d6310c11d83c6786a273e68927ca8f7eeb8f55","_id":"catberry-lazy-loader@0.6.2","_shasum":"fedf9d01fb0c8ddaaa64e3e834426a9d3d087b9f","_from":".","_npmVersion":"1.4.11","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"fedf9d01fb0c8ddaaa64e3e834426a9d3d087b9f","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-0.6.2.tgz","integrity":"sha512-eyDrwgiDAvEFbv4jzZjXIAf6qlMK9PZBM1o4I9R/sF+Uwq9uGlQdF83sMP+ePXubikAOc1QPRKxTqL+sjP/gvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYWz2TUWyxY4inaVYcodmQWOzj4NcL82EBhKn5VdZWdgIgSw4teLMKu1InrwddVoPoYyH48UOC1qsZMWHp9HgLmSI="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"1.0.2":{"name":"catberry-lazy-loader","version":"1.0.2","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"jsdom":"~0.11.0","jquery":"^2.0.0","catberry-locator":"^1.0.0","mocha":"^1.0.0","jscs":"~1.4.0","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"jshint ./ && jscs ./** && mocha --recursive"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"8c1877dab007157ed88d4d91ef76a30ea2529036","_id":"catberry-lazy-loader@1.0.2","_shasum":"cb36cfe1b101701656d44678d1b5632de9c032cc","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"cb36cfe1b101701656d44678d1b5632de9c032cc","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-1.0.2.tgz","integrity":"sha512-nR67qqGLkfFAZQyOWHB7QD8AfMLHdt2lZHUKLQHVd9aNbjNYIugXgXOdlqyQpXa1MzrO7qtssjUrNuEqFpM4hA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9FQGepaoS/vzt4sdOkl4nR8swGkIxV3UPkIIdne1aiAIhAI8N4Zvqq80rC8n7Von9x3kCoD+4V6ekZQuzDgy0lEyJ"}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"1.0.3":{"name":"catberry-lazy-loader","version":"1.0.3","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"jsdom":"~0.11.0","jquery":"^2.0.0","catberry-locator":"^1.0.0","mocha":"^1.0.0","jscs":"~1.4.0","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"jshint ./ && jscs ./** && mocha --recursive"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"4fcce4419804d1171e48ecb1fe91a671fde4e404","_id":"catberry-lazy-loader@1.0.3","_shasum":"b7b43def230eb2d6e26cfb24088a06160325c314","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"b7b43def230eb2d6e26cfb24088a06160325c314","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-1.0.3.tgz","integrity":"sha512-oQ4mzCzMvuEHBodL6pWJGbYAfFl4jZbPYGGFR/yKTFFRX0aiL2eNdwe+GglkYSek++BbRKtAnGaaamsGp8Ca6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEz4aOkh0tivuS3II5R9YxmCKcamRtO9OmB7E0puocXkAiEAor0UY0ZRWZ2j0yHLpVID3yNlELD9ICnXMn/GyhrJyBU="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"2.0.2":{"name":"catberry-lazy-loader","version":"2.0.2","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","dependencies":{"promise":"^5.0.0"},"devDependencies":{"istanbul-harmony":"~0.3.0","coveralls":"^2.11.1","jsdom":"~0.11.0","jquery":"^2.0.0","catberry-locator":"^1.0.0","mocha":"^1.0.0","jscs":"~1.4.0","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"make"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"80dbe539ff5e2467011fd7fe242e117de30f4335","_id":"catberry-lazy-loader@2.0.2","_shasum":"a169d2cf3668c3332695e281a7b3445d776b6664","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"a169d2cf3668c3332695e281a7b3445d776b6664","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-2.0.2.tgz","integrity":"sha512-sKaL/62ZyP+5ndjuMD/cNz/EUv2kRcTtHWxs0hyxprwwmL7TrVI4Hg4FawfQEiX7QhiiYAetCyoCsC8f/iU+Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAcT1XXwf4c9KNOHoN3zy78gqOsiRis6kK+DQFZiL217AiASoAZ3KrcuHWEsicDkLCbEwDPZJ+AJQOFoiJelRWCD/w=="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"2.0.3":{"name":"catberry-lazy-loader","version":"2.0.3","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","dependencies":{"promise":"^6.0.0"},"devDependencies":{"istanbul-harmony":"~0.3.0","coveralls":"^2.11.1","jsdom":"~0.11.0","jquery":"^2.0.0","catberry-locator":"^1.0.0","mocha":"^1.0.0","jscs":"~1.6.0","jshint":"~2.5.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"make"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"caa4d4e851b94ca83ba1bb80e739f2319341d046","_id":"catberry-lazy-loader@2.0.3","_shasum":"2844c7063a085d0a57a0f0f606bf81e8aab65aa1","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"2844c7063a085d0a57a0f0f606bf81e8aab65aa1","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-2.0.3.tgz","integrity":"sha512-qAuEHT9WPlT32cuKBxHyOGtOSqqMLNU3iwwntSBpaPrsTcuBWn/3A+FRt19CnWYjvIeCAxmcDG2wozyeHeBM+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEzMu7iUc9yRUGv3S9An42RxHrxeg7mtTC8StQT3qzV2AiEA7TVrwDp17ACWG7/fHU8fnv16worItY+FLoN5H1zyvKc="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"2.0.6":{"name":"catberry-lazy-loader","version":"2.0.6","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"istanbul-harmony":"~0.3.0","coveralls":"^2.11.1","jsdom":"^1.0.0","jquery":"^2.0.0","catberry-locator":"^1.0.0","mocha":"^1.0.0","jscs":"~1.6.0","jshint":"^2.0.0","promise":"^6.0.0"},"engines":{"node":"~0.10.26"},"scripts":{"test":"make"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"209f49c3aac0f54ae53508f857177fd4e4b945bf","_id":"catberry-lazy-loader@2.0.6","_shasum":"648e84f4afff7610c2a806cd66ff622d07916cca","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"648e84f4afff7610c2a806cd66ff622d07916cca","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-2.0.6.tgz","integrity":"sha512-NZq9L+Kbt0uzKk6SBzgmj/PI2bHZpbFD2V7y3NaeGFfeAIy1MRh4jG4w3VGtILvHR+a8r1+B7kIlvbkuhPHlrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIApVXN+f0JClm6D9dznSI4a/zvDb9UDoHbx2VdBICDUBAiA0y4u59NBM68+1+HpNWTRdJ1FrCUhsckWo0dFV2Gl1HQ=="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"2.0.7":{"name":"catberry-lazy-loader","version":"2.0.7","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"istanbul-harmony":"~0.3.1","coveralls":"^2.11.2","jsdom":"^3.1.1","mocha":"^2.1.0","jscs":"~1.6.2","jshint":"^2.6.0","jquery":"^2.0.0","catberry-locator":"^1.1.2","promise":"^6.1.0"},"engines":{"node":">=0.10"},"scripts":{"test":"make"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"84c454648f7a8d6c4bd5af3b156b1618f84c643e","_id":"catberry-lazy-loader@2.0.7","_shasum":"5b177a8cb890425ac5852fc4a0ef150c0e3a167b","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"5b177a8cb890425ac5852fc4a0ef150c0e3a167b","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-2.0.7.tgz","integrity":"sha512-qcsjh2xWXsvMShWRI86rIQFPkdSEhxcs1SJowGsPIZrFYZhCmCFb9KVIWLLHADrdfls5/yNQNDT/NLNQw471rg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUee2t8mKIeysHj8+7NBtASGH6FWmdzR2px57hU2if5AIhANJlbKnNPOUxPWOQXVWum1BFv9DQU27SQkNdV0RPHwP2"}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}},"2.0.8":{"name":"catberry-lazy-loader","version":"2.0.8","author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"description":"Lazy loader and infinite scroll for Catberry modules","homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"main":"./index.js","devDependencies":{"istanbul-harmony":"~0.3.1","coveralls":"^2.11.2","jsdom":"^3.1.1","mocha":"^2.1.0","jscs":"~1.6.2","jshint":"^2.6.0","jquery":"^2.0.0","catberry-locator":"^1.1.2","promise":"^6.1.0"},"engines":{"node":">=0.10"},"scripts":{"test":"make"},"licenses":[{"type":"MIT","url":"https://github.com/catberry/catberry-lazy-loader/blob/master/LICENSE"}],"gitHead":"8b03abdf951e910a6f30e9febb11175e4bc0c7c4","_id":"catberry-lazy-loader@2.0.8","_shasum":"ae33c4fe366b075ca332d40cec81a7dc4a362a61","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"pragmadash","email":"denis.rechkunov@gmail.com"},"maintainers":[{"name":"pragmadash","email":"denis.rechkunov@gmail.com"}],"dist":{"shasum":"ae33c4fe366b075ca332d40cec81a7dc4a362a61","tarball":"https://registry.npmjs.org/catberry-lazy-loader/-/catberry-lazy-loader-2.0.8.tgz","integrity":"sha512-pO+50/EcX+aEBpihF5osE6zcMngOa1WF9kx49gi6PbEEdGXBxi3asScHvR6ogPuEVekYPmS7lK3XXBI1WCDS4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5UJF+uHHnGeBd3YATIXgO18RvfBZhO+/Hv77/asUybQIgGD8FveMlnTJJtM8OuUMP0d4mnh1cIoDraaBeh7nqS0E="}]},"deprecated":"Since Catberry@4 this package is not supported due to architecture changes.","directories":{}}},"readme":"# Lazy Loading and Infinite Scroll for Catberry Modules [![Build Status](https://travis-ci.org/catberry/catberry-lazy-loader.png?branch=master)](https://travis-ci.org/catberry/catberry-lazy-loader) [![Coverage Status](https://coveralls.io/repos/catberry/catberry-lazy-loader/badge.png?branch=master)](https://coveralls.io/r/catberry/catberry-lazy-loader?branch=master) [![Codacy Badge](https://www.codacy.com/project/badge/ede56ab3f32c442e9853fd0bcb70167a)](https://www.codacy.com/public/catberry/catberry-lazy-loader.git)\n[![NPM](https://nodei.co/npm/catberry-lazy-loader.png)](https://nodei.co/npm/catberry-lazy-loader/)\n\nCurrent version supports Catberry 2.0-3.0.\n\n## Description\nThis is a simple implementation of feed with infinite scroll or lazy loading for \n[Catberry Framework](https://github.com/catberry/catberry). It wraps HTML\nelements with specified IDs and uses specified factory method to get \nnext N items to show in feed. Also it automatically loads items step by step \nwith max limit per each. For example your limit is 1000. Lazy loader will \nload 1000 items to feed but 20 times by 50 items per each.\n\n## Usage\nFirst of all you should register plugin in `browser.js` file of your \nCatberry application:\n\n```javascript\nvar lazyLoader = require('catberry-lazy-loader'),\n\tcatberry = require('catberry'),\n\tcat = catberry.create();\n\nlazyLoader.register(cat.locator);\n```\n\nThen you should create placeholder for feed with infinite scroll like this:\n\n```html\n<!-- feed placeholder reference for module news-feed -->\n<div id=\"news-feed_feed\">\n\t<!-- this is a feed container element below -->\n\t<div id=\"js-feed\">\n\t\t{#.items}\n\t\t\t<!-- foreach in reviews -->\n\t\t\t{>\"some_partial_for_feed_item\"/}\n\t\t\t<!-- /foreach -->\n\t\t{/.items}\n\t</div>\n\t<!-- this link switches on infinite scroll -->\n\t<button data-event=\"infinite-scroll\">Load more</button>\n\t<!-- this element becomes visible when next items are loading -->\n\t<div id=\"js-next-loader\"></div>\n</div>\n```\n\nRemember, your placeholder should end at the bottom of the page otherwise\ninfinite scroll does not work. You should create styles for all elements like\n`js-next-loader` and button by yourself. By default `js-next-loader` \nelement should be hidden.\n\nAlso you need to add event to `events.js`.\n```\ninfinite-scroll->infinite-scroll[news-feed]\n```\n\nThen you can use lazy loader in `news-feed`:\n\n```javascript\nfunction NewsFeedModule($serviceLocator) {\n\t// setup lazy loader in browser\n\tif (this.$context.isBrowser) {\n\t\tthis.lazyLoader = $serviceLocator.resolve('lazyLoader');\n\t\tthis.lazyLoader.containerId = 'js-feed';\n\t\tthis.lazyLoader.loaderId = 'js-next-loader';\n\t\tthis.lazyLoader.moreItemsCount = 5;\n\t\tthis.lazyLoader.itemTemplateName = 'some_partial_for_feed_item';\n\t\t// factory to get next N items from data source\n\t\tthis.lazyLoader.factory = this.itemsFactory.bind(this);\n\t}\n}\n\n/**\n * Current lazy loader instance.\n * @type {LazyLoader}\n */\nNewsFeedModule.prototype.lazyLoader = null;\n\n/**\n * Loads next chunk of items.\n * @param {jQuery|null} last Last feed item.\n * @param {Number} limit How many items to load from last.\n * @returns {Promise<Array>|Array} Array of items or promise for array.\n */\nNewsFeedModule.prototype.itemsFactory = function (last, limit) {\n\t// some logic to get next 'limit' items using 'last' rendered item\n\t// these items should be data contexts for rendering of 'dust partial'\n\t// with id 'some_partial_for_feed_item'\n\t// this method should return array or Promise for array of items\n};\n\n/**\n * Renders initial state of feed.\n * @returns {Promise.<Array>|Array} Array of items or promise for array.\n */\nNewsFeedModule.prototype.renderFeed = function () {\n\treturn this.itemsFactory(null, 10);\n};\n\n/**\n * Handles clink on 'Load more' button.\n */\nNewsFeedModule.prototype.handleInfiniteScroll = function () {\n\tthis.lazyLoader.enableInfiniteScroll();\n};\n```\n\nIf you need more complex logic for lazy loading then you can use `load(limit)` \nmethod.\n\n## Contribution\nIf you have found a bug, please create pull request with [mocha](https://www.npmjs.org/package/mocha) \nunit-test which reproduces it or describe all details in an issue if you can not\nimplement test. If you want to propose some improvements just create an issue or\na pull request but please do not forget to use `npm test` to be sure that your\ncode is awesome.\n\nAll changes should satisfy this [Code Style Guide](https://github.com/catberry/catberry/blob/4.0.0/docs/code-style-guide.md).\n\nAlso your changes should be covered by unit tests using [mocha](https://www.npmjs.org/package/mocha).\n\nDenis Rechkunov <denis.rechkunov@gmail.com>\n","maintainers":[{"email":"denis@rdner.de","name":"rdner"}],"time":{"modified":"2022-06-13T05:40:53.829Z","created":"2014-05-25T17:09:48.616Z","0.6.0":"2014-05-25T17:09:48.616Z","0.6.1":"2014-06-11T03:33:20.210Z","0.6.2":"2014-06-11T08:52:00.443Z","1.0.1":"2014-07-20T09:12:57.328Z","1.0.2":"2014-07-20T09:46:57.986Z","1.0.3":"2014-07-20T14:17:15.786Z","2.0.0":"2014-09-16T08:40:18.230Z","2.0.1":"2014-09-18T08:12:50.483Z","2.0.2":"2014-09-18T08:14:34.575Z","2.0.3":"2014-09-24T07:07:03.786Z","2.0.4":"2014-10-05T10:54:36.755Z","2.0.5":"2014-10-05T11:03:44.390Z","2.0.6":"2014-10-05T11:06:57.141Z","2.0.7":"2015-02-16T10:55:12.712Z","2.0.8":"2015-02-16T11:52:29.795Z"},"homepage":"https://github.com/catberry/catberry-lazy-loader","keywords":["catberry","feed","lazy loader","infinite scroll","pagination"],"repository":{"type":"git","url":"git://github.com/catberry/catberry-lazy-loader.git"},"author":{"name":"Denis Rechkunov","email":"denis.rechkunov@gmail.com"},"bugs":{"url":"https://github.com/catberry/catberry-lazy-loader/issues","email":"denis.rechkunov@gmail.com"},"readmeFilename":"README.md","users":{"pragmadash":true,"juliarechkunova":true}}