collections
Advanced tools
Comparing version 5.0.2 to 5.0.3
@@ -9,3 +9,3 @@ "use strict"; | ||
if(global.Map === void 0) { | ||
if((global.Map === void 0) || (typeof global.Set.prototype.values !== "function")) { | ||
Object.addEach(Map.prototype, PropertyChanges.prototype); | ||
@@ -15,5 +15,4 @@ Object.addEach(Map.prototype, MapChanges.prototype); | ||
else { | ||
Object.defineEach(Map.prototype, PropertyChanges.prototype, false, /*configurable*/true, /*enumerable*/ false, /*writable*/true); | ||
Object.defineEach(Map.prototype, MapChanges.prototype, false, /*configurable*/true, /*enumerable*/ false, /*writable*/true); | ||
} |
{ | ||
"name": "collections", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "data structures with idiomatic JavaScript collection interfaces", | ||
@@ -5,0 +5,0 @@ "homepage": "http://www.collectionsjs.com", |
32
set.js
"use strict"; | ||
console.log("global.Set is ",global.Set ); | ||
var Set = require("./_set"); | ||
@@ -10,3 +12,3 @@ var PropertyChanges = require("./listen/property-changes"); | ||
if(global.Set !== void 0) { | ||
if( (global.Set !== void 0) && (typeof global.Set.prototype.values === "function")) { | ||
GlobalSet = global.Set; | ||
@@ -127,6 +129,19 @@ module.exports = Set | ||
//This is really only for testing | ||
Object.defineProperty(Set, "_setupCollectionSet", { | ||
value: setupCollectionSet, | ||
writable: true, | ||
configurable: true, | ||
enumerable: false | ||
}); | ||
} | ||
else { | ||
setupCollectionSet(); | ||
} | ||
function setupCollectionSet() { | ||
var _CollectionsSet = Set.CollectionsSet; | ||
function CollectionsSet(values, equals, hash, getDefault) { | ||
var CollectionsSet = function CollectionsSet(values, equals, hash, getDefault) { | ||
return _CollectionsSet._init(CollectionsSet, this, values, equals, hash, getDefault); | ||
@@ -204,3 +219,8 @@ } | ||
if(global.Set === void 0) { | ||
Object.addEach(Set.CollectionsSet.prototype, PropertyChanges.prototype); | ||
Object.addEach(Set.CollectionsSet.prototype, RangeChanges.prototype); | ||
Set.CollectionsSet.prototype.makeObservable = function () { | ||
this.order.makeObservable(); | ||
}; | ||
module.exports = CollectionsSet | ||
@@ -210,6 +230,2 @@ } | ||
Object.addEach(Set.CollectionsSet.prototype, PropertyChanges.prototype); | ||
Object.addEach(Set.CollectionsSet.prototype, RangeChanges.prototype); | ||
Set.CollectionsSet.prototype.makeObservable = function () { | ||
this.order.makeObservable(); | ||
}; | ||
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
278730
7400