Socket
Socket
Sign inDemoInstall

q

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

7

CHANGES.md
## 1.4.1
- Address an issue that prevented Q from being used as a `<script>` for
Firefox add-ons. Q can now be used in any environment that provides `window`
or `self` globals, favoring `window` since add-ons have an an immutable
`self` that is distinct from `window`.
## 1.4.0

@@ -3,0 +10,0 @@

2

package.json
{
"name": "q",
"version": "1.4.0",
"version": "1.4.1",
"description": "A library for promises (CommonJS/Promises/A,B,D)",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/kriskowal/q",

@@ -58,12 +58,16 @@ // vim:ts=4:sts=4:sw=4:

// <script>
} else if (typeof self !== "undefined") {
} else if (typeof window !== "undefined" || typeof self !== "undefined") {
// Prefer window over self for add-on scripts. Use self for
// non-windowed contexts.
var global = typeof window !== "undefined" ? window : self;
// Get the `window` object, save the previous Q global
// and initialize Q as a global.
var previousQ = self.Q;
self.Q = definition();
var previousQ = global.Q;
global.Q = definition();
// Add a noConflict function so Q can be removed from the
// global namespace.
self.Q.noConflict = function () {
self.Q = previousQ;
global.Q.noConflict = function () {
global.Q = previousQ;
return this;

@@ -70,0 +74,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