worker-factory
Advanced tools
Comparing version 4.1.11 to 4.1.12
@@ -6,3 +6,6 @@ import { generateUniqueNumber } from 'fast-unique-numbers'; | ||
export const extendWorkerImplementation = (createWorker, partialWorkerImplementation, isSupportedFunction) => { | ||
return Object.assign({}, partialWorkerImplementation, { connect: ({ port }) => { | ||
return { | ||
// @todo TypeScript does not believe that partialWorkerImplementation is an object. | ||
...partialWorkerImplementation, | ||
connect: ({ port }) => { | ||
port.start(); | ||
@@ -17,3 +20,4 @@ const destroyWorker = createWorker(port, partialWorkerImplementation); | ||
return { result: portId }; | ||
}, disconnect: ({ portId }) => { | ||
}, | ||
disconnect: ({ portId }) => { | ||
const destroyWorker = DESTROY_WORKER_FUNCTIONS.get(portId); | ||
@@ -25,3 +29,4 @@ if (destroyWorker === undefined) { | ||
return { result: null }; | ||
}, isSupported: async () => { | ||
}, | ||
isSupported: async () => { | ||
const isSelfSupported = await isSupportingTransferables(); | ||
@@ -34,4 +39,5 @@ if (isSelfSupported) { | ||
return { result: false }; | ||
} }); | ||
} | ||
}; | ||
}; | ||
//# sourceMappingURL=/build/es2018/helpers/extend-worker-implementation.js.map |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/regenerator'), require('@babel/runtime/helpers/asyncToGenerator'), require('compilerr'), require('fast-unique-numbers')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/regenerator', '@babel/runtime/helpers/asyncToGenerator', 'compilerr', 'fast-unique-numbers'], factory) : | ||
(global = global || self, factory(global.workerFactory = {}, global._regeneratorRuntime, global._asyncToGenerator, global.compilerr, global.fastUniqueNumbers)); | ||
}(this, function (exports, _regeneratorRuntime, _asyncToGenerator, compilerr, fastUniqueNumbers) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/regenerator'), require('@babel/runtime/helpers/asyncToGenerator'), require('compilerr'), require('@babel/runtime/helpers/objectSpread'), require('fast-unique-numbers')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/regenerator', '@babel/runtime/helpers/asyncToGenerator', 'compilerr', '@babel/runtime/helpers/objectSpread', 'fast-unique-numbers'], factory) : | ||
(global = global || self, factory(global.workerFactory = {}, global._regeneratorRuntime, global._asyncToGenerator, global.compilerr, global._objectSpread, global.fastUniqueNumbers)); | ||
}(this, function (exports, _regeneratorRuntime, _asyncToGenerator, compilerr, _objectSpread, fastUniqueNumbers) { 'use strict'; | ||
_regeneratorRuntime = _regeneratorRuntime && _regeneratorRuntime.hasOwnProperty('default') ? _regeneratorRuntime['default'] : _regeneratorRuntime; | ||
_asyncToGenerator = _asyncToGenerator && _asyncToGenerator.hasOwnProperty('default') ? _asyncToGenerator['default'] : _asyncToGenerator; | ||
_objectSpread = _objectSpread && _objectSpread.hasOwnProperty('default') ? _objectSpread['default'] : _objectSpread; | ||
@@ -176,3 +177,3 @@ var JSON_RPC_ERROR_CODES = { | ||
var extendWorkerImplementation = function extendWorkerImplementation(createWorker, partialWorkerImplementation, isSupportedFunction) { | ||
return Object.assign({}, partialWorkerImplementation, { | ||
return _objectSpread({}, partialWorkerImplementation, { | ||
connect: function connect(_ref) { | ||
@@ -179,0 +180,0 @@ var port = _ref.port; |
@@ -12,5 +12,5 @@ { | ||
"dependencies": { | ||
"@babel/runtime": "^7.4.0", | ||
"compilerr": "^6.0.11", | ||
"fast-unique-numbers": "^3.0.8", | ||
"@babel/runtime": "^7.4.2", | ||
"compilerr": "^6.0.12", | ||
"fast-unique-numbers": "^3.0.9", | ||
"tslib": "^1.9.3" | ||
@@ -23,3 +23,3 @@ }, | ||
"@babel/plugin-transform-runtime": "^7.4.0", | ||
"@babel/preset-env": "^7.4.0", | ||
"@babel/preset-env": "^7.4.2", | ||
"@commitlint/cli": "^7.5.2", | ||
@@ -30,5 +30,5 @@ "@commitlint/config-angular": "^7.5.0", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"eslint": "^5.15.3", | ||
"eslint-config-holy-grail": "^34.0.0", | ||
"grunt": "^1.0.3", | ||
"eslint": "^5.16.0", | ||
"eslint-config-holy-grail": "^35.0.0", | ||
"grunt": "^1.0.4", | ||
"grunt-cli": "^1.3.2", | ||
@@ -52,11 +52,11 @@ "grunt-contrib-clean": "^2.0.0", | ||
"mocha": "^6.0.2", | ||
"rollup": "^1.6.0", | ||
"rollup": "^1.7.4", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"sinon": "^7.2.7", | ||
"sinon": "^7.3.1", | ||
"sinon-chai": "^3.3.0", | ||
"ts-loader": "^5.3.3", | ||
"tsconfig-holy-grail": "^9.1.11", | ||
"tsconfig-holy-grail": "^9.1.13", | ||
"tslint": "^5.14.0", | ||
"tslint-config-holy-grail": "^41.0.12", | ||
"typescript": "^3.3.3", | ||
"tslint-config-holy-grail": "^42.0.1", | ||
"typescript": "^3.4.1", | ||
"webpack": "^4.29.6" | ||
@@ -89,3 +89,3 @@ }, | ||
"types": "build/es2018/module.d.ts", | ||
"version": "4.1.11" | ||
"version": "4.1.12" | ||
} |
Sorry, the diff of this file is not supported yet
62441
796
Updated@babel/runtime@^7.4.2
Updatedcompilerr@^6.0.12
Updatedfast-unique-numbers@^3.0.9