{"_id":"vux-blazy","_rev":"4-8bd6a87172af42649b5865a5c953ac18","name":"vux-blazy","description":"A fast lightweight pure JavaScript script for lazy loading and multi-serving images, iframes, videos and more.","dist-tags":{"latest":"1.6.4"},"versions":{"1.6.3":{"name":"vux-blazy","version":"1.6.3","description":"A fast lightweight pure JavaScript script for lazy loading and multi-serving images, iframes, videos and more.","main":"blazy.js","keywords":["blazy","blazyjs","blazy.js","lazy","lazyload","lazyloading","image","images","iframe","video","unity","retina","responsive","performance"],"author":{"name":"Bjørn Klinggaard","url":"http://dinbror.dk/blazy"},"repository":{"type":"git","url":"git+https://github.com/dinbror/blazy.git"},"bugs":{"url":"https://github.com/dinbror/blazy/issues"},"license":"MIT","homepage":"https://github.com/dinbror/blazy","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"directories":{"example":"example"},"gitHead":"264cbcd29ac7a766d748dd82ab44fecc1210a8a9","_id":"vux-blazy@1.6.3","_shasum":"b8e59014eb01a09e8aed6746834910fdc0b7a9d2","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"airyland","email":"airyland@qq.com"},"dist":{"shasum":"b8e59014eb01a09e8aed6746834910fdc0b7a9d2","tarball":"https://registry.npmjs.org/vux-blazy/-/vux-blazy-1.6.3.tgz","integrity":"sha512-etxMRUaZeKOW+pu7xgAW1ARNlGQ7sZnRaQOuOg/nFkPtoC36APn63unRzlKq/4Id8fSSmDliUDMuxu5DKMwQeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfExEKdOscwjEibgDVezugThnewkdIQW9FUsGwD75uWAiBlkpVeIvPm/1fMVrtICWeTm3CkCkbj6w1CRgt0tcsC5A=="}]},"maintainers":[{"name":"airyland","email":"airyland@qq.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vux-blazy-1.6.3.tgz_1465479681032_0.3782740510068834"}},"1.6.4":{"name":"vux-blazy","version":"1.6.4","description":"A fast lightweight pure JavaScript script for lazy loading and multi-serving images, iframes, videos and more.","main":"blazy.js","keywords":["blazy","blazyjs","blazy.js","lazy","lazyload","lazyloading","image","images","iframe","video","unity","retina","responsive","performance"],"author":{"name":"Bjørn Klinggaard","url":"http://dinbror.dk/blazy"},"repository":{"type":"git","url":"git+https://github.com/dinbror/blazy.git"},"bugs":{"url":"https://github.com/dinbror/blazy/issues"},"license":"MIT","homepage":"https://github.com/dinbror/blazy","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"directories":{"example":"example"},"gitHead":"7cfb6e128973aa4b764554e0a911160ef0c31443","_id":"vux-blazy@1.6.4","_shasum":"e33073d902e0a3844ef1a463cce3ca2e0aab47bf","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"airyland","email":"airyland@qq.com"},"dist":{"shasum":"e33073d902e0a3844ef1a463cce3ca2e0aab47bf","tarball":"https://registry.npmjs.org/vux-blazy/-/vux-blazy-1.6.4.tgz","integrity":"sha512-U86iNVEBXs5RykeAUw9Bku79QDwB+AexpK6txBp/UGs57xLunLzNQaYxxfhJjJ9ObOsTb/M+QIL3IJd1ISrOPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5HgMVe4kvOzFqSuTcoi5gC20GRK4I9nIPql/JoqLf/AiEAtsqXk8lRPLeip2V59xdHSdsrCFWTP7n2f1tmum9UNv0="}]},"maintainers":[{"name":"airyland","email":"airyland@qq.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vux-blazy-1.6.4.tgz_1465572341019_0.046459072502329946"}}},"readme":"hey, be lazy\n=====\nbLazy is a lightweight script for lazy loading and multi-serving images, iframes, videos and more (less than 1.4KB minified and gzipped). It’s written in pure JavaScript why it doesn’t depend on 3rd-party libraries such as jQuery. It lets you lazy load and multi-serve your images so you can save bandwidth and server requests. The user will have faster load times and save data usage if he/she doesn't browse the whole page.\n\n**Table of Contents**<br>\n1. [Demo](https://github.com/dinbror/blazy#demo)<br>\n2. [Usage & API](https://github.com/dinbror/blazy#how-to--api)<br>\n3. [Why be lazy?](https://github.com/dinbror/blazy#why-be-lazy)<br>\n4. [Changelog](https://github.com/dinbror/blazy#changelog)<br>\n5. [License](https://github.com/dinbror/blazy#license)<br>\n\n## DEMO ##\n[http://dinbror.dk/blazy/](http://dinbror.dk/blazy/?ref=github)\n\nMore examples:\n[http://dinbror.dk/blazy/examples/](http://dinbror.dk/blazy/examples/?ref=github)\n\nCodepen playground:\nhttp://codepen.io/dinbror/pen/HzCAJ\n\n## USAGE & API ##\n[http://dinbror.dk/blog/blazy/](http://dinbror.dk/blog/blazy/?ref=github)\n\n### INSTALL\nYou can install blazy.js with npm:\n``` npm\nnpm install blazy --save\n```\nor bower:\n``` bower\nbower install blazy --save\n```\n\n### CDN\nIf you don't want to host the script yourself you can link to the latest minified file:  \n`//cdn.jsdelivr.net/blazy/latest/blazy.min.js` on [jsDelivr](http://www.jsdelivr.com/#!blazy).\nExchange `latest` with the specific version number if you want to lock it in.\n\n## WHY BE LAZY? ##\n* bLazy is used on big sites with millions of monthly visitors so it has been tested out in the real world.\n* bLazy is written in pure JavaScript why it doesn’t depend on 3rd-party libraries such as jQuery.\n* bLazy is lightweight, less than 1.4KB and less than 1.25KB if you don't need IE7- support.\n* bLazy is very fast. It has focus on performance why it also auto-destroys when it's done lazy loading.\n* bLazy can lazy load all types of images including background images.\n* bLazy is future-proof. It supports srcset and the picture element.\n* bLazy can serve retina images on retina devices.\n* bLazy can lazy load everything with a src like iframes, HTML5 videos, scripts, unity games etc.\n* bLazy supports all browsers used today including legacy browsers like IE7 and 8.\n* bLazy supports all main module formats like AMD, CommonJS and globals.  \n\n## CHANGELOG\n### v 1.6.2 (2016/05/09) ###\n* Fixed bug introduced in v.1.6.0, not using retina/breakpoint src [#90](https://github.com/dinbror/blazy/issues/90).\n\n### v 1.6.1 (2016/05/02) ###\n* Implemented a workaround for onload/onerror bug introduced in chrome v50, [LINK](https://productforums.google.com/forum/#!topic/chrome/p51Lk7vnP2o). Fixed [#85](https://github.com/dinbror/blazy/issues/85).\n\n### v 1.6.0 (2016/04/30) ###\n* Added support for srcset and the picture element. Fixed [#69](https://github.com/dinbror/blazy/issues/69), [#75](https://github.com/dinbror/blazy/issues/75), [#77](https://github.com/dinbror/blazy/issues/77) and [#82](https://github.com/dinbror/blazy/issues/82).\n* Added support for lazy load of videos with sources. Fixed [#81](https://github.com/dinbror/blazy/issues/81).\n* Bugfix. Ensuring that error and success classes won't be added multiple times. Fixed [#84](https://github.com/dinbror/blazy/issues/84).\n* Marked `breakpoints` as obsolete. Will be removed in upcoming version. Use srcset and/or the picture element instead.\n\n### v 1.5.4 (2016/03/06) ###\n* Fixed two Safari bugs: [#66](https://github.com/dinbror/blazy/issues/66) and [#78](https://github.com/dinbror/blazy/issues/78). Ensuring \"DOM ready\".\n\n### v 1.5.3 (2016/03/01) ###\n* Implemented [#30](https://github.com/dinbror/blazy/pull/30). Keeping data source until success.\n* Fixed [#47](https://github.com/dinbror/blazy/pull/47). After implementing #30 you can now get the image src and more information in the error/success callbacks.\n* Added example page to repo `/example/index.html`.\n\n### v 1.5.2 (2015/12/01) ###\n* Fixed minor bug where the error class was added when calling `revalidate()`.\n* Minor refactoring\n\n### v 1.5.1 (2015/11/14) ###\n* Fixed toArray function so it now works in IE7 + 8 again. Bug introduced in 1.4.0. Thanks for reporting [@imcotton](https://github.com/imcotton).\n* Fixed [#41](https://github.com/dinbror/blazy/pull/41). Added options for validate and saveViewportOffset delay.\n\n### v 1.5.0 (2015/10/30) ###\n* Added new feature. Now you can lazy load everything with a src attribute like iframes, unity games etc.\n* Fixed [#45](https://github.com/dinbror/blazy/issues/45). Now you can pass an option if you always want to load invisible images/elements.\n* Fixed [#49](https://github.com/dinbror/blazy/issues/49). Expanded the `load` function so it's now possible to pass a list of elements instead of only one element. Tested with getElementById, getElementsByClassName, querySelectorAll, querySelector and jQuery selector.\n* Fixed [#63](https://github.com/dinbror/blazy/issues/63). \n\n### v 1.4.1 (2015/10/12) ###\n* Fixed [#60](https://github.com/dinbror/blazy/issues/60). An \"Uncaught TypeError\" when options is null introduced in the refactoring in version 1.4.0.\n\n### v 1.4.0 (2015/09/28) ###\n* Fixed [#56](https://github.com/dinbror/blazy/issues/56). Now it's possible to create multiple versions of blazy without overriding options.\n\n### v 1.3.1 (2015/02/01) ###\n* Added support for CommonJS-like environments that support module.exports like [node](http://nodejs.org/).\n\n### v 1.3.0 (2015/01/23) ###\n* Fixed [#34](https://github.com/dinbror/blazy/issues/34). Expanded public `load` function with force attribute, so you can force hidden images to be loaded.\n* Fixed [#24](https://github.com/dinbror/blazy/issues/24), [#32](https://github.com/dinbror/blazy/issues/32) and [#35](https://github.com/dinbror/blazy/issues/35). Updated \"elementInView\" function with intersection check. Thanks @teohhanhui.  \n\n### v 1.2.2 (2014/05/04) ###\n* Fixed [#15](https://github.com/dinbror/blazy/issues/15), when you resize the browser window in another tab bLazy didn't trigger new images in view. Thanks joshribakoff.\n\n### v 1.2.1 (2014/03/23) ###\n* When lazy loading background images it now only updates the background-image css attribute. Thanks Saku.\n\n### v 1.2.0 (2014/02/15) ###\n* Important note: renamed option multi to `breakpoints` because it's much more descriptive.\n* Added [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) support.\n* Minor refactoring.\n\n### v 1.1.3 (2014/01/21) ###\n* Fixed hardcoded retina check (isRetina = true).\n* Fixed \"Uncaught TypeError\" when data-src is null. Instead it'll trigger the `error` callback.\n\n### v 1.1.2 (2014/01/03) ###\n* New feature: After many requests I added the possibility to handle retina images (if you’re not doing retina-first).\n* New feature: Now you can also lazy load background images.\n* Added new option, `separator`. Used if you want to pass retina images, default separator is ‘|’. (data-src=“image.jpg|image&#64;2x.jpg”).\n\n### v 1.1.1 (2013/12/27) ###\n* Fixed #1, resize/scroll events may be detached when adding elements by ajax.\n* Added new option, `errorClass`. Classname an image will get if something goes wrong, default is ‘b-error’.\n* Renamed option loadedClass to `successClass` so naming is aligned. Default is still ‘b-loaded’.\n\n### v 1.1.0 (2013/11/22) ###\n* Renamed success callback from onLoaded to `success`.\n* Added onerror callback; `error`.\n* Added the possibility to pass multiple containers instead of one.\n\n### v 1.0.5 (2013/10/7) ###\n* Fixed \"Uncaught TypeError\" when container isn't default (window).\n\n### v 1.0.4 (2013/8/29) ###\n* Added null check so we won't try to load an image if it's missing a data source.\n\n### v 1.0.3 (2013/8/27) ###\n* Added new option, `loadedClass`. Classname an image will get when loaded.\n* Added support for horizontal lazy loading.\n* Reduced throttle time for validate.\n\n### v 1.0.2 (2013/8/7) ###\n* Fixed typo in unbindEvent function.\n* Added support for IE7 as promised (fallback for querySelectorAll).\n\n### v 1.0.1 (2013/8/6) ###\n* Performance improvements.\n* Added throttle function to ensure that we don't call resize/scroll functions too often.\n* Cleaning image markup when image has loaded.\n\n##LICENSE: \nCopyright (c) 2013-16 Bjørn Klinggaard. Licensed under the [The MIT License (MIT)](http://opensource.org/licenses/MIT).\n","maintainers":[{"name":"airyland","email":"airyland@qq.com"}],"time":{"modified":"2022-06-28T21:11:14.337Z","created":"2016-06-09T13:41:21.567Z","1.6.3":"2016-06-09T13:41:21.567Z","1.6.4":"2016-06-10T15:25:41.488Z"},"homepage":"https://github.com/dinbror/blazy","keywords":["blazy","blazyjs","blazy.js","lazy","lazyload","lazyloading","image","images","iframe","video","unity","retina","responsive","performance"],"repository":{"type":"git","url":"git+https://github.com/dinbror/blazy.git"},"author":{"name":"Bjørn Klinggaard","url":"http://dinbror.dk/blazy"},"bugs":{"url":"https://github.com/dinbror/blazy/issues"},"license":"MIT","readmeFilename":"README.md"}