New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

carousel2

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carousel2 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

**v0.1.2** - 17/06/2016
- Fix slides flickering while loading
**v0.1.1** - 16/04/2016

@@ -2,0 +6,0 @@

2

dist/carousel.min.js

@@ -1,1 +0,1 @@

!function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(o)return o(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[u]={exports:{}};e[u][0].call(f.exports,function(t){var n=e[u][1][t];return i(n?n:t)},f,f.exports,t,e,n,r)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e,n){function r(t,e){"use strict";var n,i;if(-1!==e.indexOf(" ")){var o=e.split(" ");for(n=0,i=o.length;i>n;n++)r(t,o[n]);return this}if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&t[n].classList&&t[n].classList.add(e);return this}return t.classList?(t.classList.add(e),this):this}function i(t,e){"use strict";return""===e?!1:t.classList.contains(e)}function o(t){"use strict";return Array.prototype.slice.call(t.classList)}function u(t,e){"use strict";var n,r;if(-1!==e.indexOf(" ")){var i=e.split(" ");for(n=0,r=i.length;r>n;n++)u(t,i[n]);return this}if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&t[n].classList&&t[n].classList.remove(e);return this}return t.classList?(t.classList.remove(e),this):this}function s(t,e,n){"use strict";if("number"==typeof t.length){for(var o=t.length;o--;)t[o]&&s(t[o],e,n);return this}return void 0!==n?(n?r(t,e):u(t,e),this):(i(t,e)?u(t,e):r(t,e),this)}function a(t,e){"use strict";var n,i;if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&a(t[n],e);return this}var u,s=o(t);for(e=f+e,n=0,i=s.length;i>n;n++)u=s[n],-1===u.indexOf(e)&&r(t,u+e);return this}function c(t,e){"use strict";var n,r;if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&c(t[n],e);return this}var i,u=o(t);for(e=f+e,n=0,r=u.length;r>n;n++)i=u[n],-1!==i.indexOf(e)&&remove(t,i);return this}var f="_";e.exports={add:r,addSuffix:a,contains:i,getAll:o,remove:u,removeSuffix:c,toggle:s}},{}],2:[function(t,e,n){"use strict";var r=t("../supports");r.CLASS_LIST&&!window.DOM_EMULATE_MSIE;var i=t("./class");e.exports=i},{"../supports":15,"./class":1}],3:[function(t,e,n){"use strict";var r=t("./matches");e.exports=function(t,e){if(r(t,e))return t;for(;t=t.parentNode;)if(t!==document&&r(t,e))return t;return null}},{"./matches":7}],4:[function(t,e,n){"use strict";e.exports=function(t,e){return t.contains?t.contains(e):!!(16&t.compareDocumentPosition(e))}},{}],5:[function(t,e,n){},{}],6:[function(t,e,n){arguments[4][5][0].apply(n,arguments)},{dup:5}],7:[function(t,e,n){"use strict";var r=t("./contains"),i=function(){for(var t=document.createElement("div"),e=["oMatchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","matches"],n=e.length;n--;)if("function"==typeof t[e[n]])return e[n];return null}();e.exports=function(t,e){if(i)return"function"==typeof t[i]?t[i](e):!1;var n=e.charAt(0);if("."===n)return r(t,e.substr(1));if("["===n){e=e.split("=");var o=e[0].substr(1),u=e[1].substr(1,e[1].length-3);return t.getAttribute(o)===u}return"#"===n?t.id===e.substr(1):t.nodeName===e.toUpperCase()}},{"./contains":4}],8:[function(t,e,n){},{}],9:[function(t,e,n){"use strict";function r(t,e){var n=0,r=0,i=0,o=0;if(t){var u=t.getBoundingClientRect();if(n=u.top,r=u.left,i=u.bottom-u.top,o=u.right-u.left,e){var s=e.getBoundingClientRect();n-=s.top,r-=s.left}}return{top:n,left:r,width:o,height:i}}e.exports=r},{}],10:[function(t,e,n){"use strict";var r=t("./remove");e.exports={remove:r}},{"./remove":11}],11:[function(t,e,n){"use strict";function r(t){i.isArray(t)||(t=[t]),i.each(t,function(t){t.parentNode.removeChild(t)})}var i=t("lang2");e.exports=r},{lang2:21}],12:[function(t,e,n){"use strict";function r(t,e,n,i,o){var s,c;if(("function"==typeof n||"object"==typeof n&&null!==n)&&(o=i,i=n,n=null),"object"==typeof e&&null!==e){o=i;for(var f in e)e.hasOwnProperty(f)&&r(t,f,null,e[f],o);return this}if("object"==typeof i&&null!==i){if("function"!=typeof i.handleEvent)return null;o=i,i=i.handleEvent}if(-1!==e.indexOf(" ")){for(e=e.split(" "),s=e.length;s--;)""!==e[s]&&r(t,e[s],n,i,o);return this}if(t.length){for(s=0,c=t.length;c>s;s++)t[s]&&r(t[s],e,n,i,o);return this}var l=u(t,!0),v=a(l),d=v[e],h=void 0!==d;h||(d=[],v[e]=d),d.push({selector:n,fn:i,ctx:o});var g=_?p(t):A;return h||(m.ADD_EVENT_LISTENER?t.addEventListener(e,g,!1):m.ATTACH_EVENT&&t.attachEvent("on"+e,g)),this}function i(t,e,n,r,o){var s,a;if(("function"==typeof n||"object"==typeof n&&null!==n)&&(o=r,r=n,n=null),"object"==typeof e&&null!==e){o=r;for(var c in e)e.hasOwnProperty(c)&&i(t,c,null,e[c],o);return this}if("object"==typeof r&&null!==r){if("function"!=typeof r.handleEvent)return null;o=r,r=r.handleEvent}if(-1!==e.indexOf(" ")){for(e=e.split(" "),s=e.length;s--;)""!==e[s]&&i(t,e[s],n,r,o);return this}if(t.length){for(s=0,a=t.length;a>s;s++)t[s]&&i(t[s],e,n,r,o);return this}var f=u(t,!1);return f&&v(t,f,e,n,r,o),this}function o(t){var e=t.__uid__,n=E[e];return n.use=n.use-1,0===n.use&&delete E[e],n.fn}function u(t,e){var n=t.__uid__;return void 0===n&&e&&(n="uid"+x++,t.__uid__=n),n}function s(t,e){var n=t.__uid__;if(void 0!==n){var r=y[n];if(r)return r[e]||null}return null}function a(t){var e=y[t];return void 0===e&&(e={},y[t]=e),e}function c(t,e,n){try{t.call(n,e)}catch(r){if("function"==typeof onerror)try{onerror(r)}catch(r){}}}function f(t){return t=t||window.event,void 0===t.target&&(t.target=t.target||t.srcElement),void 0===t.defaultPrevented&&"returnValue"in t&&(t.defaultPrevented=t.returnValue===!1),void 0!==t.preventDefault&&void 0!==t.defaultPrevented||("returnValue"in t||(t.defaultPrevented=!1),t._preventDefault=t.preventDefault,t.preventDefault=l),void 0===t.stopPropagation&&(t.stopPropagation=d),t}function l(){this.defaultPrevented=!0,this.returnValue=!1,"function"==typeof this._preventDefault&&this._preventDefault()}function v(t,e,n,r,i,u){var s,c=a(e),f=-1;if(c){var l=c[n];if(l){for(var v=0,d=l.length;d>v;v++)if(s=l[v],s.selector===r&&s.fn===i&&s.ctx===u){f=v;break}if(-1!==f&&(l.splice(f,1),0===l.length)){delete c[n],h.hasKeys(c)||delete y[e];var p=_?o(t):A;m.ADD_EVENT_LISTENER?t.removeEventListener(n,p,!1):m.ATTACH_EVENT&&t.detachEvent("on"+n,p)}}}}function d(){this.cancelBubble=!0}function p(t){var e=t.__uid__,n=E[e];return n?n.use++:(n={fn:function(){return A.apply(t,arguments)},use:1},E[e]=n),n.fn}var h=t("lang2"),g=t("../dom/closest"),m=t("../supports"),y={},x=0,E=[],_=!m.ADD_EVENT_LISTENER,A=function(t){t=f(t);var e,n,r,i=s(this,t.type);if(i)for(var o=0,u=i.length;u>o;o++)e=i[o].selector,n=i[o].fn,r=i[o].ctx||this,"string"!=typeof e?c(n,t,r):null!==g(t.target,e)&&c(n,t,r);else if(window.DOM_DEBUG)throw new Error("[wrong event call]")};r.entries=y,r.wrappers=E,e.exports={add:r,remove:i}},{"../dom/closest":3,"../supports":15,lang2:21}],13:[function(t,e,n){"use strict";var r=t("./event");e.exports=r},{"./event":12}],14:[function(t,e,n){"use strict";var r=t("./class"),i=t("./event"),o=t("./element"),u=t("./dom/closest"),s=t("./dom/contains"),a=t("./dom/find"),c=t("./dom/findAll"),f=t("./dom/matches"),l=t("./dom/ready"),v=t("./dom/rect");e.exports={Event:i,Class:r,Element:o,closest:u,contains:s,find:a,findAll:c,getRect:v,matches:f,ready:l}},{"./class":2,"./dom/closest":3,"./dom/contains":4,"./dom/find":5,"./dom/findAll":6,"./dom/matches":7,"./dom/ready":8,"./dom/rect":9,"./element":10,"./event":13}],15:[function(t,e,n){"use strict";var r=document.createElement("input"),i=window.document;e.exports={ADD_EVENT_LISTENER:"addEventListener"in i,ATTACH_EVENT:"attachEvent"in i,CLASS_LIST:"classList"in r,CONTAINS:"contains"in i,EVENT_ONINPUT:"oninput"in r,EVENT_ONPROPERTYCHANGE:"onpropertychange"in r}},{}],16:[function(t,e,n){"use strict";var r=t("./indexOf");e.exports=function(t,e){return-1!==r(t,e)}},{"./indexOf":22}],17:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r=0,i=t.length;i>r;r++)e.call(n,t[r],r)}},{}],18:[function(t,e,n){"use strict";e.exports=function(t){for(var e=1,n=arguments.length;n>e;e++){var r=arguments[e];for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}},{}],19:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r=[],i=0,o=t.length;o>i;i++)e.call(n,t[i],i)&&r.push(t[i]);return r}},{}],20:[function(t,e,n){"use strict";e.exports=function(t){for(var e in t)if(t.hasOwnProperty(e))return!0;return!1}},{}],21:[function(t,e,n){"use strict";var r=t("./contains"),i=t("./each"),o=t("./extend"),u=t("./filter"),s=t("./hasKeys"),a=t("./indexOf"),c=t("./isArray"),f=t("./map");e.exports={contains:r,each:i,extend:o,filter:u,hasKeys:s,indexOf:a,isArray:c,map:f}},{"./contains":16,"./each":17,"./extend":18,"./filter":19,"./hasKeys":20,"./indexOf":22,"./isArray":23,"./map":24}],22:[function(t,e,n){"use strict";e.exports=function(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}},{}],23:[function(t,e,n){"use strict";function r(t){return"[object Array]"===i.call(t)}var i=Object.prototype.toString;e.exports=r},{}],24:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r=[],i=0,o=t.length;o>i;i++)r.push(e.call(n,t[i],i));return r}},{}],25:[function(t,e,n){"use strict";function r(t,e){function n(t,e){m.root=t,f(),r(),d(),e.autoRotate&&h.start()}function r(){}function s(t,e){var n=m.images[t],r=m.images[e];n.style.zIndex=2,r.style.zIndex=1,v(n),v(r),o.Class.add(n,"fade-out").remove(r,"fade-out"),setTimeout(function(){c(n),n.style.zIndex="auto",r.style.zIndex="auto"},2e3)}function a(t){var e=g.active+t,n=g.count-1,r=0;return e>n?e=r:r>e&&(e=n),e}function c(t){t.style.visibility="hidden"}function f(){m.images=o.findAll(m.root,".carousel-slide-image"),g.count=m.images.length}function l(){setTimeout(p,e.interval)}function v(t){t.style.visibility="visible"}function d(){i.each(m.images,function(t,e){e===g.active?v(t):c(t)})}function p(){g.autoRotate&&(h.next(),l())}var h=this,g={},m={};return e=i.extend({},u,e),g.images=e.images||[],g.active=e.active,g.autoRotate=!1,g.count=null,h.attachTo=function(t){m.target=t,m.target.appendChild(m.root)},h.destroy=function(){m.target&&m.root&&m.root.parentNode===m.target&&m.target.removeChild(m.root)},h.next=function(){var t=g.active;g.active=a(1),s(t,g.active)},h.prev=function y(){var y=g.active;g.active=y-1,g.active<0&&(g.active=g.count-1),s(y,g.active)},h.start=function(){g.autoRotate||(g.autoRotate=!0,l())},h.stop=function(){g.autoRotate=!1},n(t,e),h}var i=t("lang2"),o=t("dom2");o.findAll=function(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))};var u={active:0,autoRotate:!0,interval:5e3};r.version="0.1.0",e.exports=r},{dom2:14,lang2:21}],26:[function(t,e,n){"use strict";window.Carousel=t("./Carousel")},{"./Carousel":25}]},{},[26]);
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Carousel=t()}}(function(){return function t(e,n,r){function i(s,u){if(!n[s]){if(!e[s]){var a="function"==typeof require&&require;if(!u&&a)return a(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return i(n?n:t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){function r(t,e){"use strict";var n,i;if(-1!==e.indexOf(" ")){var o=e.split(" ");for(n=0,i=o.length;i>n;n++)r(t,o[n]);return this}if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&t[n].classList&&t[n].classList.add(e);return this}return t.classList?(t.classList.add(e),this):this}function i(t,e){"use strict";return""===e?!1:t.classList.contains(e)}function o(t){"use strict";return Array.prototype.slice.call(t.classList)}function s(t,e){"use strict";var n,r;if(-1!==e.indexOf(" ")){var i=e.split(" ");for(n=0,r=i.length;r>n;n++)s(t,i[n]);return this}if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&t[n].classList&&t[n].classList.remove(e);return this}return t.classList?(t.classList.remove(e),this):this}function u(t,e,n){"use strict";if("number"==typeof t.length){for(var o=t.length;o--;)t[o]&&u(t[o],e,n);return this}return void 0!==n?(n?r(t,e):s(t,e),this):(i(t,e)?s(t,e):r(t,e),this)}function a(t,e){"use strict";var n,i;if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&a(t[n],e);return this}var s,u=o(t);for(e=f+e,n=0,i=u.length;i>n;n++)s=u[n],-1===s.indexOf(e)&&r(t,s+e);return this}function c(t,e){"use strict";var n,r;if("number"==typeof t.length){for(n=t.length;n--;)t[n]&&c(t[n],e);return this}var i,s=o(t);for(e=f+e,n=0,r=s.length;r>n;n++)i=s[n],-1!==i.indexOf(e)&&remove(t,i);return this}var f="_";e.exports={add:r,addSuffix:a,contains:i,getAll:o,remove:s,removeSuffix:c,toggle:u}},{}],2:[function(t,e,n){"use strict";var r=t("../supports");r.CLASS_LIST&&!window.DOM_EMULATE_MSIE;var i=t("./class");e.exports=i},{"../supports":15,"./class":1}],3:[function(t,e,n){"use strict";var r=t("./matches");e.exports=function(t,e){if(r(t,e))return t;for(;t=t.parentNode;)if(t!==document&&r(t,e))return t;return null}},{"./matches":7}],4:[function(t,e,n){"use strict";e.exports=function(t,e){return t.contains?t.contains(e):!!(16&t.compareDocumentPosition(e))}},{}],5:[function(t,e,n){},{}],6:[function(t,e,n){arguments[4][5][0].apply(n,arguments)},{dup:5}],7:[function(t,e,n){"use strict";var r=t("./contains"),i=function(){for(var t=document.createElement("div"),e=["oMatchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","matches"],n=e.length;n--;)if("function"==typeof t[e[n]])return e[n];return null}();e.exports=function(t,e){if(i)return"function"==typeof t[i]?t[i](e):!1;var n=e.charAt(0);if("."===n)return r(t,e.substr(1));if("["===n){e=e.split("=");var o=e[0].substr(1),s=e[1].substr(1,e[1].length-3);return t.getAttribute(o)===s}return"#"===n?t.id===e.substr(1):t.nodeName===e.toUpperCase()}},{"./contains":4}],8:[function(t,e,n){},{}],9:[function(t,e,n){"use strict";function r(t,e){var n=0,r=0,i=0,o=0;if(t){var s=t.getBoundingClientRect();if(n=s.top,r=s.left,i=s.bottom-s.top,o=s.right-s.left,e){var u=e.getBoundingClientRect();n-=u.top,r-=u.left}}return{top:n,left:r,width:o,height:i}}e.exports=r},{}],10:[function(t,e,n){"use strict";var r=t("./remove");e.exports={remove:r}},{"./remove":11}],11:[function(t,e,n){"use strict";function r(t){i.isArray(t)||(t=[t]),i.each(t,function(t){t.parentNode.removeChild(t)})}var i=t("lang2");e.exports=r},{lang2:21}],12:[function(t,e,n){"use strict";function r(t,e,n,i,o){var u,c;if(("function"==typeof n||"object"==typeof n&&null!==n)&&(o=i,i=n,n=null),"object"==typeof e&&null!==e){o=i;for(var f in e)e.hasOwnProperty(f)&&r(t,f,null,e[f],o);return this}if("object"==typeof i&&null!==i){if("function"!=typeof i.handleEvent)return null;o=i,i=i.handleEvent}if(-1!==e.indexOf(" ")){for(e=e.split(" "),u=e.length;u--;)""!==e[u]&&r(t,e[u],n,i,o);return this}if(t.length){for(u=0,c=t.length;c>u;u++)t[u]&&r(t[u],e,n,i,o);return this}var l=s(t,!0),d=a(l),v=d[e],h=void 0!==v;h||(v=[],d[e]=v),v.push({selector:n,fn:i,ctx:o});var m=_?p(t):A;return h||(g.ADD_EVENT_LISTENER?t.addEventListener(e,m,!1):g.ATTACH_EVENT&&t.attachEvent("on"+e,m)),this}function i(t,e,n,r,o){var u,a;if(("function"==typeof n||"object"==typeof n&&null!==n)&&(o=r,r=n,n=null),"object"==typeof e&&null!==e){o=r;for(var c in e)e.hasOwnProperty(c)&&i(t,c,null,e[c],o);return this}if("object"==typeof r&&null!==r){if("function"!=typeof r.handleEvent)return null;o=r,r=r.handleEvent}if(-1!==e.indexOf(" ")){for(e=e.split(" "),u=e.length;u--;)""!==e[u]&&i(t,e[u],n,r,o);return this}if(t.length){for(u=0,a=t.length;a>u;u++)t[u]&&i(t[u],e,n,r,o);return this}var f=s(t,!1);return f&&d(t,f,e,n,r,o),this}function o(t){var e=t.__uid__,n=E[e];return n.use=n.use-1,0===n.use&&delete E[e],n.fn}function s(t,e){var n=t.__uid__;return void 0===n&&e&&(n="uid"+x++,t.__uid__=n),n}function u(t,e){var n=t.__uid__;if(void 0!==n){var r=y[n];if(r)return r[e]||null}return null}function a(t){var e=y[t];return void 0===e&&(e={},y[t]=e),e}function c(t,e,n){try{t.call(n,e)}catch(r){if("function"==typeof onerror)try{onerror(r)}catch(r){}}}function f(t){return t=t||window.event,void 0===t.target&&(t.target=t.target||t.srcElement),void 0===t.defaultPrevented&&"returnValue"in t&&(t.defaultPrevented=t.returnValue===!1),void 0!==t.preventDefault&&void 0!==t.defaultPrevented||("returnValue"in t||(t.defaultPrevented=!1),t._preventDefault=t.preventDefault,t.preventDefault=l),void 0===t.stopPropagation&&(t.stopPropagation=v),t}function l(){this.defaultPrevented=!0,this.returnValue=!1,"function"==typeof this._preventDefault&&this._preventDefault()}function d(t,e,n,r,i,s){var u,c=a(e),f=-1;if(c){var l=c[n];if(l){for(var d=0,v=l.length;v>d;d++)if(u=l[d],u.selector===r&&u.fn===i&&u.ctx===s){f=d;break}if(-1!==f&&(l.splice(f,1),0===l.length)){delete c[n],h.hasKeys(c)||delete y[e];var p=_?o(t):A;g.ADD_EVENT_LISTENER?t.removeEventListener(n,p,!1):g.ATTACH_EVENT&&t.detachEvent("on"+n,p)}}}}function v(){this.cancelBubble=!0}function p(t){var e=t.__uid__,n=E[e];return n?n.use++:(n={fn:function(){return A.apply(t,arguments)},use:1},E[e]=n),n.fn}var h=t("lang2"),m=t("../dom/closest"),g=t("../supports"),y={},x=0,E=[],_=!g.ADD_EVENT_LISTENER,A=function(t){t=f(t);var e,n,r,i=u(this,t.type);if(i)for(var o=0,s=i.length;s>o;o++)e=i[o].selector,n=i[o].fn,r=i[o].ctx||this,"string"!=typeof e?c(n,t,r):null!==m(t.target,e)&&c(n,t,r);else if(window.DOM_DEBUG)throw new Error("[wrong event call]")};r.entries=y,r.wrappers=E,e.exports={add:r,remove:i}},{"../dom/closest":3,"../supports":15,lang2:21}],13:[function(t,e,n){"use strict";var r=t("./event");e.exports=r},{"./event":12}],14:[function(t,e,n){"use strict";var r=t("./class"),i=t("./event"),o=t("./element"),s=t("./dom/closest"),u=t("./dom/contains"),a=t("./dom/find"),c=t("./dom/findAll"),f=t("./dom/matches"),l=t("./dom/ready"),d=t("./dom/rect");e.exports={Event:i,Class:r,Element:o,closest:s,contains:u,find:a,findAll:c,getRect:d,matches:f,ready:l}},{"./class":2,"./dom/closest":3,"./dom/contains":4,"./dom/find":5,"./dom/findAll":6,"./dom/matches":7,"./dom/ready":8,"./dom/rect":9,"./element":10,"./event":13}],15:[function(t,e,n){"use strict";var r=document.createElement("input"),i=window.document;e.exports={ADD_EVENT_LISTENER:"addEventListener"in i,ATTACH_EVENT:"attachEvent"in i,CLASS_LIST:"classList"in r,CONTAINS:"contains"in i,EVENT_ONINPUT:"oninput"in r,EVENT_ONPROPERTYCHANGE:"onpropertychange"in r}},{}],16:[function(t,e,n){"use strict";var r=t("./indexOf");e.exports=function(t,e){return-1!==r(t,e)}},{"./indexOf":22}],17:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r=0,i=t.length;i>r;r++)e.call(n,t[r],r)}},{}],18:[function(t,e,n){"use strict";e.exports=function(t){for(var e=1,n=arguments.length;n>e;e++){var r=arguments[e];for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}},{}],19:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r=[],i=0,o=t.length;o>i;i++)e.call(n,t[i],i)&&r.push(t[i]);return r}},{}],20:[function(t,e,n){"use strict";e.exports=function(t){for(var e in t)if(t.hasOwnProperty(e))return!0;return!1}},{}],21:[function(t,e,n){"use strict";var r=t("./contains"),i=t("./each"),o=t("./extend"),s=t("./filter"),u=t("./hasKeys"),a=t("./indexOf"),c=t("./isArray"),f=t("./map");e.exports={contains:r,each:i,extend:o,filter:s,hasKeys:u,indexOf:a,isArray:c,map:f}},{"./contains":16,"./each":17,"./extend":18,"./filter":19,"./hasKeys":20,"./indexOf":22,"./isArray":23,"./map":24}],22:[function(t,e,n){"use strict";e.exports=function(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}},{}],23:[function(t,e,n){"use strict";function r(t){return"[object Array]"===i.call(t)}var i=Object.prototype.toString;e.exports=r},{}],24:[function(t,e,n){"use strict";e.exports=function(t,e,n){for(var r=[],i=0,o=t.length;o>i;i++)r.push(e.call(n,t[i],i));return r}},{}],25:[function(t,e,n){"use strict";function r(t,e){function n(t,e){y.root=t,l(),r(),p(),e.autoRotate&&m.start()}function r(){}function a(t,e){var n=y.slides[t],r=y.slides[e];n.style.zIndex=2,r.style.zIndex=1,v(n),v(r),o.Class.add(n,s).remove(r,s),setTimeout(function(){f(n),n.style.zIndex="auto",r.style.zIndex="auto"},2e3)}function c(t){var e=g.active+t,n=g.count-1,r=0;return e>n?e=r:r>e&&(e=n),e}function f(t){t.style.visibility="hidden"}function l(){y.slides=o.findAll(y.root,".carousel-slide"),g.count=y.slides.length}function d(){setTimeout(h,e.interval)}function v(t){t.style.visibility="visible"}function p(){i.each(y.slides,function(t,e){e===g.active?v(t):f(t)})}function h(){g.autoRotate&&(m.next(),d())}var m=this,g={},y={};return e=i.extend({},u,e),g.slides=e.slides||[],g.active=e.active,g.autoRotate=!1,g.count=null,m.attachTo=function(t){y.target=t,y.target.appendChild(y.root)},m.destroy=function(){y.target&&y.root&&y.root.parentNode===y.target&&y.target.removeChild(y.root)},m.next=function(){var t=g.active;g.active=c(1),a(t,g.active)},m.prev=function x(){var x=g.active;g.active=x-1,g.active<0&&(g.active=g.count-1),a(x,g.active)},m.start=function(){g.autoRotate||(g.autoRotate=!0,d())},m.stop=function(){g.autoRotate=!1},n(t,e),m}var i=t("lang2"),o=t("dom2"),s="carousel-slide--hidden";o.findAll=function(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))};var u={active:0,autoRotate:!0,interval:5e3};r.version="0.1.0",e.exports=r},{dom2:14,lang2:21}],26:[function(t,e,n){"use strict";e.exports=t("./Carousel")},{"./Carousel":25}]},{},[26])(26)});
{
"name": "carousel2",
"version": "0.1.1",
"version": "0.1.2",
"description": "Lightweight and fast dependency free Carousel UI component.",

@@ -5,0 +5,0 @@ "main": "./dist/carousel.js",

# carousel
Lightweight and fast dependency free Carousel UI component.
## Build
```
npm run build
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc