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

rollup-plugin-web-worker-loader

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-web-worker-loader - npm Package Compare versions

Comparing version 0.5.2 to 0.6.0

4

package.json
{
"name": "rollup-plugin-web-worker-loader",
"version": "0.5.2",
"version": "0.6.0",
"description": "Rollup plugin to handle Web Workers",

@@ -20,4 +20,4 @@ "main": "src/index.js",

"devDependencies": {
"eslint": "^6.1.0"
"eslint": "^6.3.0"
}
}
const kIsNodeJS = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
const kRequire = kIsNodeJS ? module.require : null; // eslint-disable-line
const kRequire = kIsNodeJS && typeof module.require === 'function' ? module.require : null; // eslint-disable-line

@@ -8,7 +8,7 @@ export function createInlineWorkerFactory(fn, sourcemap = null) {

const end = source.indexOf('}', source.length - 1);
const body = source.substring(start, end) + (sourcemap ? `//# sourceMappingURL=${sourcemap}` : '');
const body = source.substring(start, end) + (sourcemap ? `\/\/# sourceMappingURL=${sourcemap}` : '');
const blankPrefixLength = body.search(/\S/);
const lines = body.split('\n').map(line => line.substring(blankPrefixLength) + '\n');
if (kIsNodeJS) {
if (kRequire) {
/* node.js */

@@ -31,3 +31,3 @@ const Worker = kRequire('worker_threads').Worker; // eslint-disable-line

export function createURLWorkerFactory(url) {
if (kIsNodeJS) {
if (kRequire) {
/* node.js */

@@ -48,5 +48,5 @@ const Worker = kRequire('worker_threads').Worker; // eslint-disable-line

const start = source.indexOf('\n', 10) + 1;
const body = source.substring(start) + (sourcemap ? `//# sourceMappingURL=${sourcemap}` : '');
const body = source.substring(start) + (sourcemap ? `\/\/# sourceMappingURL=${sourcemap}` : '');
if (kIsNodeJS) {
if (kRequire) {
/* node.js */

@@ -53,0 +53,0 @@ const Worker = kRequire('worker_threads').Worker; // eslint-disable-line

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