Socket
Socket
Sign inDemoInstall

karma-viewport

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-viewport - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

dist/adapter/index.d.ts

4

dist/adapter/index.js

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

!function(t,n){for(var e in n)t[e]=n[e]}(window,function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(2);!function(t,n){t.viewport=new r.Viewport(n,t)}(window,window.__viewport__)},function(t,n,e){"use strict";(function(t){function r(t){return c(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||u()}function o(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,n){return c(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return e}(t,n)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function c(t){if(Array.isArray(t))return t}Object.defineProperty(n,"__esModule",{value:!0}),e(6);var s=e(7);function f(t,n){var e=i([n,arguments.length>2&&void 0!==arguments[2]?arguments[2]:n].map(function(n){var e=t.findIndex(function(t){return t.name===n});if(-1===e)throw new ReferenceError("Invalid breakpoint: ".concat(s.inspect(n)));return e}),2),r=e[0],o=e[1];return t.slice(r,o+1)}n.range=f;var a=function(){function n(t,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=e,o=e.document.querySelector(t.context);!o&&r!==r.parent;)o=(r=r.parent).document.querySelector(t.context);if(!(o instanceof r.HTMLIFrameElement))throw new ReferenceError("No match for selector: ".concat(s.inspect(t.context)));this.config=t,this.context=o}var e,u,c;return e=n,(u=[{key:"load",value:function(n,e){var r=this;return new t(function(t){r.context.addEventListener("load",function n(){r.context.removeEventListener("load",n),e&&e(),t()}),r.context.src=n})}},{key:"offset",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.context.contentWindow.scrollTo(t,n)}},{key:"set",value:function(t,n){if("string"==typeof t){var e=i(f(this.config.breakpoints,t),1)[0];return this.set(e.size.width,e.size.height)}var r=t;if("number"!=typeof r||r<=0)throw new TypeError("Invalid breakpoint width: ".concat(r));if(n&&("number"!=typeof n||n<=0))throw new TypeError("Invalid breakpoint height: ".concat(n));this.context.style.width="".concat(r,"px"),n&&(this.context.style.height="".concat(n,"px")),this.context.contentDocument.body.getBoundingClientRect()}},{key:"reset",value:function(){this.context.contentWindow.scrollTo(0,0),this.context.style.width="",this.context.style.height="",this.context.contentDocument.body.getBoundingClientRect()}},{key:"between",value:function(n,e,o){var i,u=this,c=r(f(this.config.breakpoints,n,e)),s=c[0],a=c.slice(1),l=function(t){return u.set(t.size.width,t.size.height),o(t.name)},h=l(s);if(i=h,t.resolve(i)===i)return a.reduce(function(t,n){return t.then(function(){return n}).then(l)},h).then(function(){return u.reset()});a.forEach(l),this.reset()}},{key:"each",value:function(t){return this.between(this.config.breakpoints[0].name,this.config.breakpoints[this.config.breakpoints.length-1].name,t)}},{key:"from",value:function(t,n){return this.between(t,this.config.breakpoints[this.config.breakpoints.length-1].name,n)}},{key:"to",value:function(t,n){return this.between(this.config.breakpoints[0].name,t,n)}}])&&o(e.prototype,u),c&&o(e,c),n}();n.Viewport=a}).call(this,e(3))},function(t,n,e){(function(n,e){
!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);!function(t,e){t.viewport=new r.Viewport(e,t)}(window,window.__viewport__)},function(t,e,n){"use strict";(function(t){function r(t){return c(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||u()}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return c(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function c(t){if(Array.isArray(t))return t}Object.defineProperty(e,"__esModule",{value:!0}),n(6);var s=n(7);function a(t,e){var n=i([e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:e].map(function(e){var n=t.findIndex(function(t){return t.name===e});if(-1===n)throw new ReferenceError("Invalid breakpoint: ".concat(s.inspect(e)));return n}),2),r=n[0],o=n[1];return t.slice(r,o+1)}e.range=a;var f=function(){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=n,o=n.document.querySelector(t.context);!o&&r!==r.parent;)o=(r=r.parent).document.querySelector(t.context);if(!(o instanceof r.HTMLIFrameElement))throw new ReferenceError("No match for selector: ".concat(s.inspect(t.context)));this.config=t,this.context=o}var n,u,c;return n=e,(u=[{key:"load",value:function(e,n){var r=this;return new t(function(t){r.context.addEventListener("load",function e(){r.context.removeEventListener("load",e),n&&n(),t()}),r.context.src=e})}},{key:"offset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.context.contentWindow.scrollTo(t,e)}},{key:"set",value:function(t,e){if("string"==typeof t){var n=i(a(this.config.breakpoints,t),1)[0];return this.set(n.size.width,n.size.height)}var r=t;if("number"!=typeof r||r<=0)throw new TypeError("Invalid breakpoint width: ".concat(r));if(e&&("number"!=typeof e||e<=0))throw new TypeError("Invalid breakpoint height: ".concat(e));this.context.style.width="".concat(r,"px"),e&&(this.context.style.height="".concat(e,"px")),this.context.contentDocument.body.getBoundingClientRect()}},{key:"reset",value:function(){this.context.contentWindow.scrollTo(0,0),this.context.style.width="",this.context.style.height="",this.context.contentDocument.body.getBoundingClientRect()}},{key:"between",value:function(e,n,o){var i,u=this,c=r(a(this.config.breakpoints,e,n)),s=c[0],f=c.slice(1),l=function(t){return u.set(t.size.width,t.size.height),o(t.name)},h=l(s);if(i=h,t.resolve(i)===i)return f.reduce(function(t,e){return t.then(function(){return e}).then(l)},h).then(function(){return u.reset()});f.forEach(l),this.reset()}},{key:"each",value:function(t){return this.between(this.config.breakpoints[0].name,this.config.breakpoints[this.config.breakpoints.length-1].name,t)}},{key:"from",value:function(t,e){return this.between(t,this.config.breakpoints[this.config.breakpoints.length-1].name,e)}},{key:"to",value:function(t,e){return this.between(this.config.breakpoints[0].name,t,e)}}])&&o(n.prototype,u),c&&o(n,c),e}();e.Viewport=f}).call(this,n(3))},function(t,e,n){(function(e,n){
/*!

@@ -8,3 +8,3 @@ * @overview es6-promise - a tiny implementation of Promises/A+.

* @version v4.2.5+7f2b526d
*/var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,i=void 0,u=void 0,c=function(t,n){p[o]=t,p[o+1]=n,2===(o+=2)&&(u?u(d):m())},s="undefined"!=typeof window?window:void 0,f=s||{},a=f.MutationObserver||f.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==n&&"[object process]"==={}.toString.call(n),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){var t=setTimeout;return function(){return t(d,1)}}var p=new Array(1e3);function d(){for(var t=0;t<o;t+=2){(0,p[t])(p[t+1]),p[t]=void 0,p[t+1]=void 0}o=0}var w,y,g,b,m=void 0;function _(t,n){var e=this,r=new this.constructor(j);void 0===r[S]&&V(r);var o=e._state;if(o){var i=arguments[o-1];c(function(){return W(o,r,i,e._result)})}else z(e,r,t,n);return r}function x(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var n=new this(j);return L(n,t),n}l?m=function(){return n.nextTick(d)}:a?(y=0,g=new a(d),b=document.createTextNode(""),g.observe(b,{characterData:!0}),m=function(){b.data=y=++y%2}):h?((w=new MessageChannel).port1.onmessage=d,m=function(){return w.port2.postMessage(0)}):m=void 0===s?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(d)}:v()}catch(t){return v()}}():v();var S=Math.random().toString(36).substring(2);function j(){}var A=void 0,E=1,O=2,T={error:null};function P(t){try{return t.then}catch(t){return T.error=t,T}}function k(n,e,r){e.constructor===n.constructor&&r===_&&e.constructor.resolve===x?function(t,n){n._state===E?M(t,n._result):n._state===O?F(t,n._result):z(n,void 0,function(n){return L(t,n)},function(n){return F(t,n)})}(n,e):r===T?(F(n,T.error),T.error=null):void 0===r?M(n,e):t(r)?function(t,n,e){c(function(t){var r=!1,o=function(t,n,e,r){try{t.call(n,e,r)}catch(t){return t}}(e,n,function(e){r||(r=!0,n!==e?L(t,e):M(t,e))},function(n){r||(r=!0,F(t,n))},t._label);!r&&o&&(r=!0,F(t,o))},t)}(n,e,r):M(n,e)}function L(t,n){var e,r;t===n?F(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(e=n),null===e||"object"!==r&&"function"!==r?M(t,n):k(t,n,P(n)))}function I(t){t._onerror&&t._onerror(t._result),q(t)}function M(t,n){t._state===A&&(t._result=n,t._state=E,0!==t._subscribers.length&&c(q,t))}function F(t,n){t._state===A&&(t._state=O,t._result=n,c(I,t))}function z(t,n,e,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=n,o[i+E]=e,o[i+O]=r,0===i&&t._state&&c(q,t)}function q(t){var n=t._subscribers,e=t._state;if(0!==n.length){for(var r=void 0,o=void 0,i=t._result,u=0;u<n.length;u+=3)r=n[u],o=n[u+e],r?W(e,r,o,i):o(i);t._subscribers.length=0}}function W(n,e,r,o){var i=t(r),u=void 0,c=void 0,s=void 0,f=void 0;if(i){if((u=function(t,n){try{return t(n)}catch(t){return T.error=t,T}}(r,o))===T?(f=!0,c=u.error,u.error=null):s=!0,e===u)return void F(e,new TypeError("A promises callback cannot return that same promise."))}else u=o,s=!0;e._state!==A||(i&&s?L(e,u):f?F(e,c):n===E?M(e,u):n===O&&F(e,u))}var B=0;function V(t){t[S]=B++,t._state=void 0,t._result=void 0,t._subscribers=[]}var D=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(j),this.promise[S]||V(this.promise),r(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&M(this.promise,this._result))):F(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var n=0;this._state===A&&n<t.length;n++)this._eachEntry(t[n],n)},t.prototype._eachEntry=function(t,n){var e=this._instanceConstructor,r=e.resolve;if(r===x){var o=P(t);if(o===_&&t._state!==A)this._settledAt(t._state,n,t._result);else if("function"!=typeof o)this._remaining--,this._result[n]=t;else if(e===J){var i=new e(j);k(i,t,o),this._willSettleAt(i,n)}else this._willSettleAt(new e(function(n){return n(t)}),n)}else this._willSettleAt(r(t),n)},t.prototype._settledAt=function(t,n,e){var r=this.promise;r._state===A&&(this._remaining--,t===O?F(r,e):this._result[n]=e),0===this._remaining&&M(r,this._result)},t.prototype._willSettleAt=function(t,n){var e=this;z(t,void 0,function(t){return e._settledAt(E,n,t)},function(t){return e._settledAt(O,n,t)})},t}(),J=function(){function n(t){this[S]=B++,this._result=this._state=void 0,this._subscribers=[],j!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof n?function(t,n){try{n(function(n){L(t,n)},function(n){F(t,n)})}catch(n){F(t,n)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(n){var e=this.constructor;return t(n)?this.then(function(t){return e.resolve(n()).then(function(){return t})},function(t){return e.resolve(n()).then(function(){throw t})}):this.then(n,n)},n}();return J.prototype.then=_,J.all=function(t){return new D(this,t).promise},J.race=function(t){var n=this;return r(t)?new n(function(e,r){for(var o=t.length,i=0;i<o;i++)n.resolve(t[i]).then(e,r)}):new n(function(t,n){return n(new TypeError("You must pass an array to race."))})},J.resolve=x,J.reject=function(t){var n=new this(j);return F(n,t),n},J._setScheduler=function(t){u=t},J._setAsap=function(t){c=t},J._asap=c,J.polyfill=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.cast)return}t.Promise=J},J.Promise=J,J},t.exports=r()}).call(this,e(4),e(5))},function(t,n){var e,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,f=[],a=!1,l=-1;function h(){a&&s&&(a=!1,s.length?f=s.concat(f):l=-1,f.length&&v())}function v(){if(!a){var t=c(h);a=!0;for(var n=f.length;n;){for(s=f,f=[];++l<n;)s&&s[l].run();l=-1,n=f.length}s=null,a=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(n){try{return r.call(null,t)}catch(n){return r.call(this,t)}}}(t)}}function p(t,n){this.fun=t,this.array=n}function d(){}o.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)n[e-1]=arguments[e];f.push(new p(t,n)),1!==f.length||a||c(v)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=void(Array.prototype.findIndex||(Array.prototype.findIndex=function(t){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n,e=Object(this),r=e.length>>>0,o=arguments[1],i=0;i<r;i++)if(n=e[i],t.call(o,n,i,e))return i;return-1}))},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.inspect=function(t){switch(r(t)){case"object":return JSON.stringify(t,void 0,2).replace(/\s+/g," ");case"string":return"'".concat(t,"'")}return(""+t).replace(/\s+/g," ")}}]));
*/var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,i=void 0,u=void 0,c=function(t,e){v[o]=t,v[o+1]=e,2===(o+=2)&&(u?u(d):g())},s="undefined"!=typeof window?window:void 0,a=s||{},f=a.MutationObserver||a.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var t=setTimeout;return function(){return t(d,1)}}var v=new Array(1e3);function d(){for(var t=0;t<o;t+=2){(0,v[t])(v[t+1]),v[t]=void 0,v[t+1]=void 0}o=0}var y,b,m,w,g=void 0;function _(t,e){var n=this,r=new this.constructor(A);void 0===r[T]&&D(r);var o=n._state;if(o){var i=arguments[o-1];c(function(){return R(o,r,i,n._result)})}else F(n,r,t,e);return r}function x(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(A);return P(e,t),e}l?g=function(){return e.nextTick(d)}:f?(b=0,m=new f(d),w=document.createTextNode(""),m.observe(w,{characterData:!0}),g=function(){w.data=b=++b%2}):h?((y=new MessageChannel).port1.onmessage=d,g=function(){return y.port2.postMessage(0)}):g=void 0===s?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(d)}:p()}catch(t){return p()}}():p();var T=Math.random().toString(36).substring(2);function A(){}var j=void 0,S=1,E=2,k={error:null};function O(t){try{return t.then}catch(t){return k.error=t,k}}function M(e,n,r){n.constructor===e.constructor&&r===_&&n.constructor.resolve===x?function(t,e){e._state===S?I(t,e._result):e._state===E?L(t,e._result):F(e,void 0,function(e){return P(t,e)},function(e){return L(t,e)})}(e,n):r===k?(L(e,k.error),k.error=null):void 0===r?I(e,n):t(r)?function(t,e,n){c(function(t){var r=!1,o=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,function(n){r||(r=!0,e!==n?P(t,n):I(t,n))},function(e){r||(r=!0,L(t,e))},t._label);!r&&o&&(r=!0,L(t,o))},t)}(e,n,r):I(e,n)}function P(t,e){var n,r;t===e?L(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?I(t,e):M(t,e,O(e)))}function C(t){t._onerror&&t._onerror(t._result),z(t)}function I(t,e){t._state===j&&(t._result=e,t._state=S,0!==t._subscribers.length&&c(z,t))}function L(t,e){t._state===j&&(t._state=E,t._result=e,c(C,t))}function F(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+S]=n,o[i+E]=r,0===i&&t._state&&c(z,t)}function z(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,u=0;u<e.length;u+=3)r=e[u],o=e[u+n],r?R(n,r,o,i):o(i);t._subscribers.length=0}}function R(e,n,r,o){var i=t(r),u=void 0,c=void 0,s=void 0,a=void 0;if(i){if((u=function(t,e){try{return t(e)}catch(t){return k.error=t,k}}(r,o))===k?(a=!0,c=u.error,u.error=null):s=!0,n===u)return void L(n,new TypeError("A promises callback cannot return that same promise."))}else u=o,s=!0;n._state!==j||(i&&s?P(n,u):a?L(n,c):e===S?I(n,u):e===E&&L(n,u))}var q=0;function D(t){t[T]=q++,t._state=void 0,t._result=void 0,t._subscribers=[]}var N=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(A),this.promise[T]||D(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?I(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&I(this.promise,this._result))):L(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===j&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===x){var o=O(t);if(o===_&&t._state!==j)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===W){var i=new n(A);M(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===j&&(this._remaining--,t===E?L(r,n):this._result[e]=n),0===this._remaining&&I(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;F(t,void 0,function(t){return n._settledAt(S,e,t)},function(t){return n._settledAt(E,e,t)})},t}(),W=function(){function e(t){this[T]=q++,this._result=this._state=void 0,this._subscribers=[],A!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e(function(e){P(t,e)},function(e){L(t,e)})}catch(e){L(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return t(e)?this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})}):this.then(e,e)},e}();return W.prototype.then=_,W.all=function(t){return new N(this,t).promise},W.race=function(t){var e=this;return r(t)?new e(function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}):new e(function(t,e){return e(new TypeError("You must pass an array to race."))})},W.resolve=x,W.reject=function(t){var e=new this(A);return L(e,t),e},W._setScheduler=function(t){u=t},W._setAsap=function(t){c=t},W._asap=c,W.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=W},W.Promise=W,W},t.exports=r()}).call(this,n(4),n(5))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,a=[],f=!1,l=-1;function h(){f&&s&&(f=!1,s.length?a=s.concat(a):l=-1,a.length&&p())}function p(){if(!f){var t=c(h);f=!0;for(var e=a.length;e;){for(s=a,a=[];++l<e;)s&&s[l].run();l=-1,e=a.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function v(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new v(t,e)),1!==a.length||f||c(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=void(Array.prototype.findIndex||(Array.prototype.findIndex=function(t){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(e=n[i],t.call(o,e,i,n))return i;return-1}))},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.inspect=function(t){switch(r(t)){case"object":return JSON.stringify(t,void 0,2).replace(/\s+/g," ");case"string":return"'".concat(t,"'")}return(""+t).replace(/\s+/g," ")}}]));
//# sourceMappingURL=index.js.map
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"required": [
"context",
"breakpoints"
],
"properties": {
"context": {
"description": "Context element selector",
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"required": [
"context",
"breakpoints"
],
"properties": {
"context": {
"description": "Context element selector",
"type": "string"
},
"breakpoints": {
"description": "Breakpoints",
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"size"
],
"properties": {
"name": {
"description": "Breakpoint name",
"type": "string"
},
"breakpoints": {
"description": "Breakpoints",
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"size"
],
"properties": {
"name": {
"description": "Breakpoint name",
"type": "string"
},
"size": {
"description": "Breakpoint viewport",
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"description": "Viewport width",
"type": "integer"
},
"height": {
"description": "Viewport height",
"type": "integer"
}
}
}
}
},
"size": {
"description": "Breakpoint viewport",
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"description": "Viewport width",
"type": "integer"
},
"height": {
"description": "Viewport height",
"type": "integer"
}
}
}
}
}
}
}
}
{
"name": "karma-viewport",
"version": "1.0.3",
"version": "1.0.4",
"description": "A Karma plugin for testing responsive features and layout",

@@ -45,2 +45,4 @@ "keywords": [

"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@types/chance": "^1.0.1",

@@ -53,4 +55,2 @@ "@types/jasmine": "^3.3.5",

"array-findindex-polyfill": "^0.1.0",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"babel-loader": "^8.0.4",

@@ -60,3 +60,2 @@ "chance": "^1.0.18",

"es6-promise": "^4.2.5",
"git-hooks": "^1.1.8",
"istanbul-instrumenter-loader": "^3.0.1",

@@ -71,3 +70,3 @@ "jasmine-core": "^3.3.0",

"karma-jasmine": "^2.0.1",
"karma-sauce-launcher": "^2.0.2",
"karma-sauce-launcher": "^1.2.0",
"karma-sourcemap-loader": "^0.3.7",

@@ -83,4 +82,4 @@ "karma-spec-reporter": "^0.0.32",

"webpack": "^4.28.2",
"webpack-cli": "^3.1.2"
"webpack-cli": "^3.2.1"
}
}

@@ -5,2 +5,3 @@ [![Travis][travis-image]][travis-link]

[![npm][npm-image]][npm-link]
[![dependabot][dependabot-image]][dependabot-link]

@@ -15,2 +16,4 @@ [travis-image]: https://travis-ci.org/squidfunk/karma-viewport.svg?branch=master

[npm-link]: https://npmjs.com/package/karma-viewport
[dependabot-image]: https://img.shields.io/badge/dependabot-enabled-06f.svg
[dependabot-link]: https://dependabot.com

@@ -188,3 +191,3 @@ # karma-viewport

Copyright (c) 2017-2018 Martin Donath
Copyright (c) 2017-2019 Martin Donath

@@ -191,0 +194,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

Sorry, the diff of this file is not supported yet

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