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

perfops-rom

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perfops-rom - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

84

dist/rom.js

@@ -137,18 +137,22 @@ "use strict";

"data": [{
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 3,

@@ -158,2 +162,6 @@ "cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",

}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"
}, {
"id": 18,

@@ -163,2 +171,6 @@ "cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",

}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 22,

@@ -168,20 +180,16 @@ "cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",

}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 25,
"cdnUrl": "https://perf.gamepiper.com/500b-bench.jpg",
"p": "0"
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"p": "1"
}, {
"id": 15,
"cdnUrl": "https://perfstack.qtlglb.com/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"id": 16,
"cdnUrl": "https://19405s.ha.azioncdn.net/500b-bench.jpg",
"p": "1"

@@ -193,14 +201,22 @@ }, {

}, {
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"id": 15,
"cdnUrl": "https://perfstack.qtlglb.com/500b-bench.jpg",
"p": "1"
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"p": "1"
}, {
"id": 25,
"cdnUrl": "https://perf.gamepiper.com/500b-bench.jpg",
"p": "0"
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": "1"
}, {
"id": 17,

@@ -210,21 +226,5 @@ "cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",

}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": "1"
}, {
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 16,
"cdnUrl": "https://19405s.ha.azioncdn.net/500b-bench.jpg",
"p": "1"
}]

@@ -231,0 +231,0 @@ };

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

"use strict";!function(a){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,u=t.logError;function o(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,c=void 0===e?function(){}:e,o=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new a(function(n,t){var e=new XMLHttpRequest;e.onload=function(){if(200<=e.status&&e.status<300)return n(e);e.onerror()},e.onerror=e.ontimeout=function(){u(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,c(e),e.send(o)})}function r(){setTimeout(function(){o("https://api.perfops.net/rum-cdn.php").then(function(n){return JSON.parse(n.response)}).then(function(n){if(!n||!n.data||!n.data.length)throw new Error("Empty response.data");return n}).catch(function(){return{data:[{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:25,cdnUrl:"https://perf.gamepiper.com/500b-bench.jpg",p:"0"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://perfstack.qtlglb.com/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/500b-bench.jpg",p:"1"},{id:16,cdnUrl:"https://19405s.ha.azioncdn.net/500b-bench.jpg",p:"1"}]}}).then(function(n){var t=[],e={ua:navigator.userAgent},r=0,c=0;return function(n,r){return n.reduce(function(n,e){return n.then(function(t){return r(e).then(function(n){return t.push(n),t})})},a.resolve([]))}(n.data,function(n){return function(e){var r="".concat(e.cdnUrl,"?t=").concat(Date.now());return o(r).then(function(n){var t=performance.getEntriesByName(r)[0];return{id:e.id,up:1,time:Number((t.duration-(t.domainLookupEnd-t.domainLookupStart)-(t.connectEnd-t.connectStart)).toFixed(2)),headers:n.getAllResponseHeaders()}}).catch(function(){return{id:e.id,up:0}})}(n).then(function(n){if(n.up?2e3<n.time&&r++:c++,!(1<c||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(c=0,r<2?(r=0,p(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(c<=1&&t.length)return p(e,t)})}).then(e,u)},1e3)}function p(n,t){return o("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).catch(u)}n=function(){if(void 0!==window.performance)return"function"==typeof a?r():void function(n,t){var e,r=document.createElement("script");r.onreadystatechange=r.onload=function(){e||t(),e=!0},r.setAttribute("src",n),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,r()})},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
"use strict";!function(a){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,u=t.logError;function o(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,c=void 0===e?function(){}:e,o=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new a(function(n,t){var e=new XMLHttpRequest;e.onload=function(){if(200<=e.status&&e.status<300)return n(e);e.onerror()},e.onerror=e.ontimeout=function(){u(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,c(e),e.send(o)})}function r(){setTimeout(function(){o("https://api.perfops.net/rum-cdn.php").then(function(n){return JSON.parse(n.response)}).then(function(n){if(!n||!n.data||!n.data.length)throw new Error("Empty response.data");return n}).catch(function(){return{data:[{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:16,cdnUrl:"https://19405s.ha.azioncdn.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://perfstack.qtlglb.com/500b-bench.jpg",p:"1"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:25,cdnUrl:"https://perf.gamepiper.com/500b-bench.jpg",p:"0"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"}]}}).then(function(n){var t=[],e={ua:navigator.userAgent},r=0,c=0;return function(n,r){return n.reduce(function(n,e){return n.then(function(t){return r(e).then(function(n){return t.push(n),t})})},a.resolve([]))}(n.data,function(n){return function(e){var r="".concat(e.cdnUrl,"?t=").concat(Date.now());return o(r).then(function(n){var t=performance.getEntriesByName(r)[0];return{id:e.id,up:1,time:Number((t.duration-(t.domainLookupEnd-t.domainLookupStart)-(t.connectEnd-t.connectStart)).toFixed(2)),headers:n.getAllResponseHeaders()}}).catch(function(){return{id:e.id,up:0}})}(n).then(function(n){if(n.up?2e3<n.time&&r++:c++,!(1<c||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(c=0,r<2?(r=0,p(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(c<=1&&t.length)return p(e,t)})}).then(e,u)},1e3)}function p(n,t){return o("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).catch(u)}n=function(){if(void 0!==window.performance)return"function"==typeof a?r():void function(n,t){var e,r=document.createElement("script");r.onreadystatechange=r.onload=function(){e||t(),e=!0},r.setAttribute("src",n),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,r()})},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);

@@ -137,18 +137,22 @@ "use strict";

"data": [{
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 3,

@@ -158,2 +162,6 @@ "cdnUrl": "https://perfops.perfstack.cf-china.info/500b-bench.jpg",

}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"p": "1"
}, {
"id": 18,

@@ -163,2 +171,6 @@ "cdnUrl": "https://azure-perfops.azureedge.net/500b-bench.jpg",

}, {
"id": 13,
"cdnUrl": "https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",
"p": "1"
}, {
"id": 22,

@@ -168,20 +180,16 @@ "cdnUrl": "https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",

}, {
"id": 5,
"cdnUrl": "https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 25,
"cdnUrl": "https://perf.gamepiper.com/500b-bench.jpg",
"p": "0"
}, {
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"id": 14,
"cdnUrl": "https://perfops.r.worldssl.net/500b-bench.jpg",
"p": "1"
}, {
"id": 15,
"cdnUrl": "https://perfstack.qtlglb.com/500b-bench.jpg",
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"p": "1"
}, {
"id": 10,
"cdnUrl": "https://akamai.perfstack.net/500b-bench.jpg",
"id": 16,
"cdnUrl": "https://19405s.ha.azioncdn.net/500b-bench.jpg",
"p": "1"

@@ -193,14 +201,22 @@ }, {

}, {
"id": 11,
"cdnUrl": "https://perfops.b-cdn.net/500b-bench.jpg",
"id": 15,
"cdnUrl": "https://perfstack.qtlglb.com/500b-bench.jpg",
"p": "1"
}, {
"id": 24,
"cdnUrl": "https://img-cdnperf.mncdn.com/500b-bench.jpg",
"id": 12,
"cdnUrl": "https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 6,
"cdnUrl": "https://perfops-ade2.kxcdn.com/500b-bench.jpg",
"id": 9,
"cdnUrl": "https://1933886249.rsc.cdn77.org/500b-bench.jpg",
"p": "1"
}, {
"id": 25,
"cdnUrl": "https://perf.gamepiper.com/500b-bench.jpg",
"p": "0"
}, {
"id": 20,
"cdnUrl": "https://cdnperf.cachefly.net/500b-bench.jpg",
"p": "1"
}, {
"id": 17,

@@ -210,21 +226,5 @@ "cdnUrl": "https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",

}, {
"id": 4,
"cdnUrl": "https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",
"p": "1"
}, {
"id": 8,
"cdnUrl": "https://perfops.gcdn.co/500b-bench.jpg",
"p": "1"
}, {
"id": 2,
"cdnUrl": "https://ovhcdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 7,
"cdnUrl": "https://googlecdn.perfstack.net/500b-bench.jpg",
"p": "1"
}, {
"id": 16,
"cdnUrl": "https://19405s.ha.azioncdn.net/500b-bench.jpg",
"p": "1"
}]

@@ -231,0 +231,0 @@ };

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

"use strict";!function(a){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,u=t.logError;function o(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,c=void 0===e?function(){}:e,o=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new a(function(n,t){var e=new XMLHttpRequest;e.onload=function(){if(200<=e.status&&e.status<300)return n(e);e.onerror()},e.onerror=e.ontimeout=function(){u(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,c(e),e.send(o)})}function r(){setTimeout(function(){o("https://api.perfops.net/rum-cdn.php").then(function(n){return JSON.parse(n.response)}).then(function(n){if(!n||!n.data||!n.data.length)throw new Error("Empty response.data");return n}).catch(function(){return{data:[{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:25,cdnUrl:"https://perf.gamepiper.com/500b-bench.jpg",p:"0"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://perfstack.qtlglb.com/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/500b-bench.jpg",p:"1"},{id:16,cdnUrl:"https://19405s.ha.azioncdn.net/500b-bench.jpg",p:"1"}]}}).then(function(n){var t=[],e={ua:navigator.userAgent},r=0,c=0;return function(n,r){return n.reduce(function(n,e){return n.then(function(t){return r(e).then(function(n){return t.push(n),t})})},a.resolve([]))}(n.data,function(n){return function(e){var r="".concat(e.cdnUrl,"?t=").concat(Date.now());return o(r).then(function(n){var t=performance.getEntriesByName(r)[0];return{id:e.id,up:1,time:Number((t.duration-(t.domainLookupEnd-t.domainLookupStart)-(t.connectEnd-t.connectStart)).toFixed(2)),headers:n.getAllResponseHeaders()}}).catch(function(){return{id:e.id,up:0}})}(n).then(function(n){if(n.up?2e3<n.time&&r++:c++,!(1<c||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(c=0,r<2?(r=0,p(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(c<=1&&t.length)return p(e,t)})}).then(e,u)},3e3)}function p(n,t){return o("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).catch(u)}n=function(){if(void 0!==window.performance)return"function"==typeof a?r():void function(n,t){var e,r=document.createElement("script");r.onreadystatechange=r.onload=function(){e||t(),e=!0},r.setAttribute("src",n),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,r()})},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
"use strict";!function(a){var n,t=-1!==function(){}.toString().indexOf("minified")?{logInfo:console.log,logError:console.error}:{logInfo:function(){},logError:function(){}},e=t.logInfo,u=t.logError;function o(r,n){var t=1<arguments.length&&void 0!==n?n:{},e=t.cb,c=void 0===e?function(){}:e,o=t.data,p=t.method,d=void 0===p?"GET":p,i=t.timeout,s=void 0===i?3e3:i;return new a(function(n,t){var e=new XMLHttpRequest;e.onload=function(){if(200<=e.status&&e.status<300)return n(e);e.onerror()},e.onerror=e.ontimeout=function(){u(e),t(new Error("Status ".concat(e.status,". Response: ").concat(e.statusText)))},e.open(d,r),e.timeout=s,c(e),e.send(o)})}function r(){setTimeout(function(){o("https://api.perfops.net/rum-cdn.php").then(function(n){return JSON.parse(n.response)}).then(function(n){if(!n||!n.data||!n.data.length)throw new Error("Empty response.data");return n}).catch(function(){return{data:[{id:4,cdnUrl:"https://fastly.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:2,cdnUrl:"https://ovhcdn.perfstack.net/500b-bench.jpg",p:"1"},{id:10,cdnUrl:"https://akamai.perfstack.net/500b-bench.jpg",p:"1"},{id:11,cdnUrl:"https://perfops.b-cdn.net/500b-bench.jpg",p:"1"},{id:7,cdnUrl:"https://googlecdn.perfstack.net/500b-bench.jpg",p:"1"},{id:3,cdnUrl:"https://perfops.perfstack.cf-china.info/500b-bench.jpg",p:"1"},{id:5,cdnUrl:"https://d2axgrpnciinw7.cloudfront.net/500b-bench.jpg",p:"1"},{id:18,cdnUrl:"https://azure-perfops.azureedge.net/500b-bench.jpg",p:"1"},{id:13,cdnUrl:"https://m9d7v5r2.map2.ssl.hwcdn.net/500b-bench.jpg",p:"1"},{id:22,cdnUrl:"https://09d3da8545e855ce.cdn.gocache.net/500b-bench.jpg",p:"1"},{id:6,cdnUrl:"https://perfops-ade2.kxcdn.com/500b-bench.jpg",p:"1"},{id:14,cdnUrl:"https://perfops.r.worldssl.net/500b-bench.jpg",p:"1"},{id:24,cdnUrl:"https://img-cdnperf.mncdn.com/500b-bench.jpg",p:"1"},{id:16,cdnUrl:"https://19405s.ha.azioncdn.net/500b-bench.jpg",p:"1"},{id:1,cdnUrl:"https://kgmni17536myjst.belugacdn.link/500b-bench.jpg",p:"1"},{id:15,cdnUrl:"https://perfstack.qtlglb.com/500b-bench.jpg",p:"1"},{id:12,cdnUrl:"https://cdn.jsdelivr.net/gh/jimaek/js-test@1.1/500b-bench.jpg",p:"1"},{id:9,cdnUrl:"https://1933886249.rsc.cdn77.org/500b-bench.jpg",p:"1"},{id:25,cdnUrl:"https://perf.gamepiper.com/500b-bench.jpg",p:"0"},{id:20,cdnUrl:"https://cdnperf.cachefly.net/500b-bench.jpg",p:"1"},{id:17,cdnUrl:"https://edgecast.perfstack.net/8086B5F/bench/500b-bench.jpg",p:"1"},{id:8,cdnUrl:"https://perfops.gcdn.co/500b-bench.jpg",p:"1"}]}}).then(function(n){var t=[],e={ua:navigator.userAgent},r=0,c=0;return function(n,r){return n.reduce(function(n,e){return n.then(function(t){return r(e).then(function(n){return t.push(n),t})})},a.resolve([]))}(n.data,function(n){return function(e){var r="".concat(e.cdnUrl,"?t=").concat(Date.now());return o(r).then(function(n){var t=performance.getEntriesByName(r)[0];return{id:e.id,up:1,time:Number((t.duration-(t.domainLookupEnd-t.domainLookupStart)-(t.connectEnd-t.connectStart)).toFixed(2)),headers:n.getAllResponseHeaders()}}).catch(function(){return{id:e.id,up:0}})}(n).then(function(n){if(n.up?2e3<n.time&&r++:c++,!(1<c||n.up&&(n.time<3||3e3<n.time)))return 2<=t.push(n)?(c=0,r<2?(r=0,p(e,t.splice(0,t.length))):(r=0,t.splice(0,t.length))):void 0})}).then(function(){if(c<=1&&t.length)return p(e,t)})}).then(e,u)},3e3)}function p(n,t){return o("https://devnull.perfops.net/rum/v1",{data:JSON.stringify({metadata:n,data:t}),method:"POST"}).catch(u)}n=function(){if(void 0!==window.performance)return"function"==typeof a?r():void function(n,t){var e,r=document.createElement("script");r.onreadystatechange=r.onload=function(){e||t(),e=!0},r.setAttribute("src",n),document.body.appendChild(r)}("https://cdn.jsdelivr.net/npm/es6-promise@4.2.4/dist/es6-promise.min.js",function(){a=window.ES6Promise,r()})},"complete"===document.readyState?n():window.addEventListener("load",n)}(window.Promise);
{
"name": "perfops-rom",
"version": "1.0.2",
"jsdelivr": "./dist/rom.min3.js",
"version": "1.0.3",
"jsdelivr": "./dist/rom3.min.js",
"description": "RUM code for https://perfops.net/",

@@ -6,0 +6,0 @@ "files": [

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