Comparing version 2.0.5 to 2.0.6
@@ -0,1 +1,6 @@ | ||
2.0.6 | ||
===== | ||
* framebus can be required (but not executed) from Node.js® environments. | ||
2.0.5 | ||
@@ -2,0 +7,0 @@ ===== |
'use strict'; | ||
(function (root, factory) { | ||
if (typeof exports === 'object' && typeof module !== 'undefined') { | ||
module.exports = factory(); | ||
module.exports = factory(root); | ||
} else if (typeof define === 'function' && define.amd) { | ||
define([], factory); | ||
define([], function () { return factory(root); }); | ||
} else { | ||
root.framebus = factory(); | ||
root.framebus = factory(root); | ||
} | ||
})(this, function () { // eslint-disable-line no-invalid-this | ||
})(this, function (root) { // eslint-disable-line no-invalid-this | ||
var win, framebus; | ||
@@ -151,3 +151,3 @@ var popups = []; | ||
if (win) { return; } | ||
win = w || window; | ||
win = w || root; | ||
@@ -154,0 +154,0 @@ if (win.addEventListener) { |
@@ -1,1 +0,1 @@ | ||
"use strict";!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):n.framebus=e()}(this,function(){function n(n){return null==n?!1:null==n.Window?!1:n.constructor!==n.Window?!1:(m.push(n),!0)}function e(n){var e,r={};for(e in b)b.hasOwnProperty(e)&&(r[e]=b[e]);return r._origin=n||"*",r}function r(n){var e,r,t=i(this);return u(n)?!1:u(t)?!1:(r=Array.prototype.slice.call(arguments,1),e=s(n,r,t),e===!1?!1:(x(y.top,e,t),!0))}function t(n,e){var r=i(this);return v(n,e,r)?!1:(w[r]=w[r]||{},w[r][n]=w[r][n]||[],w[r][n].push(e),!0)}function o(n,e){var r,t,o=i(this);if(v(n,e,o))return!1;if(t=w[o]&&w[o][n],!t)return!1;for(r=0;r<t.length;r++)if(t[r]===e)return t.splice(r,1),!0;return!1}function i(n){return n&&n._origin||"*"}function u(n){return"string"!=typeof n}function s(n,e,r){var t=!1,o={event:n,origin:r},i=e[e.length-1];"function"==typeof i&&(o.reply=h(i,r),e=e.slice(0,-1)),o.args=e;try{t=E+JSON.stringify(o)}catch(u){throw new Error("Could not stringify event: "+u.message)}return t}function a(n){var e,r,t,o;if(n.data.slice(0,E.length)!==E)return!1;try{e=JSON.parse(n.data.slice(E.length))}catch(i){return!1}return null!=e.reply&&(r=n.origin,t=n.source,o=e.reply,e.reply=function(n){var e=s(o,[n],r);return e===!1?!1:(t.postMessage(e,r),void 0)},e.args.push(e.reply)),e}function c(n){y||(y=n||window,y.addEventListener?y.addEventListener("message",l,!1):y.attachEvent?y.attachEvent("onmessage",l):null===y.onmessage?y.onmessage=l:y=null)}function f(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var e=16*Math.random()|0,r="x"===n?e:3&e|8;return r.toString(16)})}function l(n){var e;u(n.data)||(e=a(n),e&&(p("*",e.event,e.args,n),p(n.origin,e.event,e.args,n),d(n.data,e.origin,n.source)))}function p(n,e,r,t){var o;if(w[n]&&w[n][e])for(o=0;o<w[n][e].length;o++)w[n][e][o].apply(t,r)}function g(n){return n.top!==n?!1:null==n.opener?!1:n.opener===n?!1:n.opener.closed===!0?!1:!0}function x(n,e,r){var t;try{for(n.postMessage(e,r),g(n)&&x(n.opener.top,e,r),t=0;t<n.frames.length;t++)x(n.frames[t],e,r)}catch(o){}}function d(n,e,r){var t,o;for(t=m.length-1;t>=0;t--)o=m[t],o.closed===!0?m=m.slice(t,1):r!==o&&x(o.top,n,e)}function h(n,e){function r(o,i){n(o,i),b.target(e).unsubscribe(t,r)}var t=f();return b.target(e).subscribe(t,r),t}function v(n,e,r){return u(n)?!0:"function"!=typeof e?!0:u(r)?!0:!1}var y,b,m=[],w={},E="/*framebus*/";return c(),b={target:e,include:n,publish:r,pub:r,trigger:r,emit:r,subscribe:t,sub:t,on:t,unsubscribe:o,unsub:o,off:o}}); | ||
"use strict";!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(n):"function"==typeof define&&define.amd?define([],function(){return r(n)}):n.framebus=r(n)}(this,function(n){function r(n){return null==n?!1:null==n.Window?!1:n.constructor!==n.Window?!1:(w.push(n),!0)}function e(n){var r,e={};for(r in m)m.hasOwnProperty(r)&&(e[r]=m[r]);return e._origin=n||"*",e}function t(n){var r,e,t=i(this);return s(n)?!1:s(t)?!1:(e=Array.prototype.slice.call(arguments,1),r=a(n,e,t),r===!1?!1:(d(b.top,r,t),!0))}function o(n,r){var e=i(this);return y(n,r,e)?!1:(E[e]=E[e]||{},E[e][n]=E[e][n]||[],E[e][n].push(r),!0)}function u(n,r){var e,t,o=i(this);if(y(n,r,o))return!1;if(t=E[o]&&E[o][n],!t)return!1;for(e=0;e<t.length;e++)if(t[e]===r)return t.splice(e,1),!0;return!1}function i(n){return n&&n._origin||"*"}function s(n){return"string"!=typeof n}function a(n,r,e){var t=!1,o={event:n,origin:e},u=r[r.length-1];"function"==typeof u&&(o.reply=v(u,e),r=r.slice(0,-1)),o.args=r;try{t=M+JSON.stringify(o)}catch(i){throw new Error("Could not stringify event: "+i.message)}return t}function c(n){var r,e,t,o;if(n.data.slice(0,M.length)!==M)return!1;try{r=JSON.parse(n.data.slice(M.length))}catch(u){return!1}return null!=r.reply&&(e=n.origin,t=n.source,o=r.reply,r.reply=function(n){var r=a(o,[n],e);return r===!1?!1:(t.postMessage(r,e),void 0)},r.args.push(r.reply)),r}function f(r){b||(b=r||n,b.addEventListener?b.addEventListener("message",p,!1):b.attachEvent?b.attachEvent("onmessage",p):null===b.onmessage?b.onmessage=p:b=null)}function l(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=16*Math.random()|0,e="x"===n?r:3&r|8;return e.toString(16)})}function p(n){var r;s(n.data)||(r=c(n),r&&(g("*",r.event,r.args,n),g(n.origin,r.event,r.args,n),h(n.data,r.origin,n.source)))}function g(n,r,e,t){var o;if(E[n]&&E[n][r])for(o=0;o<E[n][r].length;o++)E[n][r][o].apply(t,e)}function x(n){return n.top!==n?!1:null==n.opener?!1:n.opener===n?!1:n.opener.closed===!0?!1:!0}function d(n,r,e){var t;try{for(n.postMessage(r,e),x(n)&&d(n.opener.top,r,e),t=0;t<n.frames.length;t++)d(n.frames[t],r,e)}catch(o){}}function h(n,r,e){var t,o;for(t=w.length-1;t>=0;t--)o=w[t],o.closed===!0?w=w.slice(t,1):e!==o&&d(o.top,n,r)}function v(n,r){function e(o,u){n(o,u),m.target(r).unsubscribe(t,e)}var t=l();return m.target(r).subscribe(t,e),t}function y(n,r,e){return s(n)?!0:"function"!=typeof r?!0:s(e)?!0:!1}var b,m,w=[],E={},M="/*framebus*/";return f(),m={target:e,include:r,publish:t,pub:t,trigger:t,emit:t,subscribe:o,sub:o,on:o,unsubscribe:u,unsub:u,off:u}}); |
@@ -9,3 +9,3 @@ { | ||
"homepage": "https://github.com/braintree/framebus", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"main": "dist/framebus.js", | ||
@@ -19,3 +19,3 @@ "browser": "dist/framebus.js", | ||
"lint": "eslint .", | ||
"test": "npm run lint && xvfb-run --server-num=99 gulp test", | ||
"test": "npm run lint && xvfb-run -a --server-num=99 gulp test", | ||
"start": "./bin/www" | ||
@@ -22,0 +22,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19443
1