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

lzma

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lzma - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

16

lzma.js
/// This code is licensed under the MIT License. See LICENSE for more details.
/// Does the environment support web workers? If not, let's fake it.
if (!Worker) {
///NOTE: Since web workers don't work when a page is loaded from the local system, we have to fake it there too. (Take that security measures!)
if (!Worker || (location && location.protocol === "file:")) {
///NOTE: IE8 and IE9 needs onmessage to be created first, IE7- do not care.

@@ -31,3 +32,3 @@ ///NOTE: Because IE9 implements part of the Web Worker's spec, postMessage() must be overwritten.

script_tag.src = path;
document.getElementsByTagName('head')[0].appendChild(script_tag);
document.getElementsByTagName("head")[0].appendChild(script_tag);
};

@@ -41,8 +42,13 @@ }

return_object.postMessage = function (message) {
/// Delay the call just in case the "worker" script has not had time to load.
setTimeout(function () {
/// Has the worker script loaded yet?
if (global_var.onmessage) {
/// Call the global onmessage() created by the "worker."
///NOTE: Wrap the message in an object.
global_var.onmessage({data: message});
}, 10);
} else {
/// Since the script has not yet loaded, wait a moment, and then retry.
setTimeout(function () {
return_object.postMessage(message);
}, 50);
}
};

@@ -49,0 +55,0 @@

@@ -5,3 +5,3 @@ {

"description": "A standalone JavaScript implementation of the Lempel-Ziv-Markov chain (LZMA) compression algorithm",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/nmrugg/LZMA-JS",

@@ -8,0 +8,0 @@ "repository": {

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