Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workerboxjs

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workerboxjs - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

19

lib/index.js
let workerBoxCount = 0;
function createWorkerBox (scriptUrl) {
function createWorkerBox (scriptUrl, options) {
options = {
appendVersion: true,
randomiseSubdomain: true,
...options,
}
if (scriptUrl.slice(-1) === '/') {

@@ -8,3 +14,6 @@ scriptUrl = scriptUrl.slice(0, -1);

scriptUrl = scriptUrl + '/v2.1.0/';
if (options.appendVersion) {
scriptUrl = scriptUrl + '/v2.2.0/';
}
try {

@@ -20,4 +29,6 @@ scriptUrl = new URL(scriptUrl);

const subdomain = [...Array(30)].map(() => Math.random().toString(36)[2]).join('');
scriptUrl.host = `${subdomain}.${scriptUrl.host}`
if (options.randomiseSubdomain) {
const subdomain = [...Array(30)].map(() => Math.random().toString(36)[2]).join('');
scriptUrl.host = `${subdomain}.${scriptUrl.host}`
}

@@ -24,0 +35,0 @@ workerBoxCount = workerBoxCount + 1;

{
"name": "workerboxjs",
"version": "2.1.0",
"version": "2.2.0",
"type": "module",

@@ -8,2 +8,4 @@ "description": "A secure sandbox to execute untrusted user JavaScript, in a web browser, without any risk to your own domain/site/page.",

"scripts": {
"start": "node build.js --watch & servatron --http2 --port 8002 --directory server/dist",
"build": "node build.js",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -35,4 +37,7 @@ },

"devDependencies": {
"@markwylde/ftp-deploy": "^1.2.0"
"@markwylde/ftp-deploy": "^1.2.0",
"chokidar": "^3.5.3",
"esbuild": "^0.15.12",
"minify": "^9.1.0"
}
}
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