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

async-array-buffer-broker

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-array-buffer-broker - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

build/es2015/module.js

@@ -33,3 +33,3 @@ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;

const deallocate = (arrayBuffer) => {
worker.postMessage({ id: null, method: 'deallocate', params: { arrayBuffer } });
worker.postMessage({ id: null, method: 'deallocate', params: { arrayBuffer } }, [arrayBuffer]);
};

@@ -36,0 +36,0 @@ return {

@@ -40,3 +40,3 @@ (function (global, factory) {

var deallocate = function deallocate(arrayBuffer) {
worker.postMessage({ id: null, method: 'deallocate', params: { arrayBuffer: arrayBuffer } });
worker.postMessage({ id: null, method: 'deallocate', params: { arrayBuffer: arrayBuffer } }, [arrayBuffer]);
};

@@ -43,0 +43,0 @@ return {

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.asyncArrayBufferBroker=e.asyncArrayBufferBroker||{})}(this,function(e){"use strict";var r=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,a=function(e){for(var a=Math.round(Math.random()*r);e.has(a);)a=Math.round(Math.random()*r);return a},t=function(e){var r=new Worker(e),t=new Set;return{allocate:function(e){return new Promise(function(n,o){var s=a(t);t.add(s);var d=function e(a){var d=a.data;d.id===s&&(t.delete(s),r.removeEventListener("message",e),null===d.error?n(d.result.arrayBuffer):o(new Error(d.error.message)))};r.addEventListener("message",d),r.postMessage({id:s,method:"allocate",params:{length:e}})})},deallocate:function(e){r.postMessage({id:null,method:"deallocate",params:{arrayBuffer:e}})}}};e.load=t,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.asyncArrayBufferBroker=e.asyncArrayBufferBroker||{})}(this,function(e){"use strict";var r=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,a=function(e){for(var a=Math.round(Math.random()*r);e.has(a);)a=Math.round(Math.random()*r);return a},t=function(e){var r=new Worker(e),t=new Set;return{allocate:function(e){return new Promise(function(n,o){var s=a(t);t.add(s);var d=function e(a){var d=a.data;d.id===s&&(t.delete(s),r.removeEventListener("message",e),null===d.error?n(d.result.arrayBuffer):o(new Error(d.error.message)))};r.addEventListener("message",d),r.postMessage({id:s,method:"allocate",params:{length:e}})})},deallocate:function(e){r.postMessage({id:null,method:"deallocate",params:{arrayBuffer:e}},[e])}}};e.load=t,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -34,3 +34,3 @@ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;

var deallocate = function (arrayBuffer) {
worker.postMessage({ id: null, method: 'deallocate', params: { arrayBuffer: arrayBuffer } });
worker.postMessage({ id: null, method: 'deallocate', params: { arrayBuffer: arrayBuffer } }, [arrayBuffer]);
};

@@ -37,0 +37,0 @@ return {

@@ -39,3 +39,3 @@ {

"tsconfig-holy-grail": "^2.1.0",
"tslint-config-holy-grail": "^7.0.0",
"tslint-config-holy-grail": "^8.0.0",
"typescript": "^2.0.9",

@@ -65,3 +65,3 @@ "webpack": "^2.1.0-beta.25"

"types": "build/es2015/module.d.ts",
"version": "1.0.1"
"version": "1.0.2"
}

@@ -47,3 +47,3 @@ import { IAllocateRequest, IAllocateResponse, IDeallocateNotification, IWorkerEvent } from 'async-array-buffer-worker';

const deallocate = (arrayBuffer: ArrayBuffer) => {
worker.postMessage(<IDeallocateNotification> { id: null, method: 'deallocate', params: { arrayBuffer } });
worker.postMessage(<IDeallocateNotification> { id: null, method: 'deallocate', params: { arrayBuffer } }, [ arrayBuffer ]);
};

@@ -50,0 +50,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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