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.2.0 to 0.2.1

4

CHANGELOG.md

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

**v0.2.1** - 17/06/2016
- Fix dist file
**v0.2.0** - 17/06/2016

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

2

dist/carousel.min.js

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

!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)});
!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||(y.ADD_EVENT_LISTENER?t.addEventListener(e,m,!1):y.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=g[n];if(r)return r[e]||null}return null}function a(t){var e=g[t];return void 0===e&&(e={},g[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 g[e];var p=_?o(t):A;y.ADD_EVENT_LISTENER?t.removeEventListener(n,p,!1):y.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"),y=t("../supports"),g={},x=0,E=[],_=!y.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=g,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(){return"carousel-"+u++}function i(t,e){function n(t,e){x.id=r(),_.container=t,v(),h(),i(),y(),e.autoRotate&&x.start()}function i(){}function u(t,n){var r=_.slides[t],i=_.slides[n];r.style.zIndex=2,i.style.zIndex=1,m(r),m(i),s.Class.add(r,a).remove(i,a),setTimeout(function(){d(r),r.style.zIndex="auto",i.style.zIndex="auto"},e.fadeDuration)}function f(t){return t=o.extend({},c,t),t.fadeDuration=parseInt(t.fadeDuration,10),t.interval=parseInt(t.interval,10),t}function l(t){var e=E.active+t,n=E.count-1,r=0;return e>n?e=r:r>e&&(e=n),e}function d(t){t.style.visibility="hidden"}function v(){_.root=_.container.firstElementChild,_.root.id=x.id,_.slides=s.findAll(_.root,'[data-element="slide"]'),E.count=_.slides.length}function p(){setTimeout(g,e.interval)}function h(){var t=document.createElement("style"),n="opacity "+e.fadeDuration+"ms;",r="#"+x.id+" .carousel-slide--hidden";t.innerHTML=[r+" {","-webkit-transition: "+n,"transition: "+n,"}"].join("\n"),_.root.appendChild(t)}function m(t){t.style.visibility="visible"}function y(){o.each(_.slides,function(t,e){e===E.active?m(t):d(t)})}function g(){E.autoRotate&&(x.next(),p())}var x=this,E={},_={};return e=f(e),E.slides=e.slides||[],E.active=e.active,E.autoRotate=!1,E.count=null,x.attachTo=function(t){_.target=t,_.target.appendChild(_.root)},x.destroy=function(){_.target&&_.root&&_.root.parentNode===_.target&&_.target.removeChild(_.root)},x.next=function(){var t=E.active;E.active=l(1),u(t,E.active)},x.prev=function A(){var A=E.active;E.active=A-1,E.active<0&&(E.active=E.count-1),u(A,E.active)},x.start=function(){E.autoRotate||(E.autoRotate=!0,p())},x.stop=function(){E.autoRotate=!1},n(t,e),x}var o=t("lang2"),s=t("dom2"),u=0,a="carousel-slide--hidden";s.findAll=function(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))};var c={active:0,autoRotate:!0,fadeDuration:2e3,interval:5e3};i.version="0.2.0",e.exports=i},{dom2:14,lang2:21}],26:[function(t,e,n){"use strict";e.exports=t("./Carousel")},{"./Carousel":25}]},{},[26])(26)});

@@ -30,3 +30,3 @@ 'use strict';

gulp.task('build:js', function(cb) {
gulp.task('js', function(cb) {
exec('./node_modules/.bin/browserify src/index.js -o dist/carousel.js -s Carousel', function (err, stdout, stderr) {

@@ -44,3 +44,3 @@ console.log(stdout);

gulp.task('build:css', function() {
gulp.task('css', function() {
return gulp.src(paths.styles)

@@ -57,3 +57,3 @@ .pipe(sass().on('error', sass.logError))

gulp.task('minify', function () {
gulp.task('min', function () {
return gulp.src('dist/carousel.js')

@@ -87,7 +87,7 @@ .pipe(uglify({

gulp.watch(paths.scripts, [
'build:js'
'js'
]);
gulp.watch(paths.styles, [
'build:css'
'css'
]);

@@ -102,3 +102,3 @@ });

gulp.task('build', [
'build:js', 'build:css'
'js', 'css'
]);

@@ -105,0 +105,0 @@

{
"name": "carousel2",
"version": "0.2.0",
"version": "0.2.1",
"description": "Lightweight and fast dependency free Carousel UI component.",
"main": "./dist/carousel.js",
"scripts": {
"build": "gulp build",
"build": "gulp build && npm run min",
"min": "gulp min",
"report": "gulp report",

@@ -9,0 +10,0 @@ "test": "gulp test"

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