Comparing version 1.9.3 to 1.9.4
# Changes | ||
## 1.9.4 | ||
- [`ae3284d`](https://github.com/mroderick/PubSubJS/commit/ae3284d46054b189e143b405e1bfc6c09643bf77) | ||
Use existing root.pubSub when present (#213) (abishek-srinivasan) | ||
> | ||
> This means that loading `pubsub-js` more than once in the same environment will work as the author expects. A warning will be output on the console to make the developer aware of the duplication. | ||
_Released on 2021-11-11._ | ||
## 1.9.3 | ||
@@ -4,0 +13,0 @@ |
{ | ||
"name": "pubsub-js", | ||
"version": "1.9.3", | ||
"version": "1.9.4", | ||
"description": "Dependency free publish/subscribe library", | ||
@@ -5,0 +5,0 @@ "main": "./src/pubsub.js", |
@@ -42,3 +42,3 @@ <div align="center"> | ||
* Install via npm (`npm install pubsub-js`) | ||
* Use it directly from a CDN directly | ||
* Use it directly from a CDN | ||
- http://www.jsdelivr.com/#!pubsubjs | ||
@@ -45,0 +45,0 @@ - https://cdnjs.com/libraries/pubsub-js |
@@ -12,4 +12,10 @@ /** | ||
var PubSub = {}; | ||
root.PubSub = PubSub; | ||
factory(PubSub); | ||
if (root.PubSub) { | ||
PubSub = root.PubSub; | ||
console.warn("PubSub already loaded, using existing version"); | ||
} else { | ||
root.PubSub = PubSub; | ||
factory(PubSub); | ||
} | ||
// CommonJS and Node.js module support | ||
@@ -16,0 +22,0 @@ if (typeof exports === 'object'){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112480
1083