diff --git a/Set.js b/Set.js index b2451d2..6d62c25 100644 --- a/Set.js +++ b/Set.js @@ -13,7 +13,7 @@ /*********************************************************************/ // Set set operation shorthands... -Set.prototype.unite = function(other){ +Set.prototype.unite = function(other=[]){ return new Set([...this, ...other]) } Set.prototype.intersect = function(other){ var test = other.has ? @@ -22,14 +22,14 @@ Set.prototype.intersect = function(other){ return new Set([...this] .filter(function(e){ return other[test](e) })) } -Set.prototype.subtract = function(other){ +Set.prototype.subtract = function(other=[]){ other = new Set(other) return new Set([...this] .filter(function(e){ return !other.has(e) })) } -Map.prototype.sort = function(keys){ +Map.prototype.sort = function(keys=[]){ keys = (typeof(keys) == 'function' || keys === undefined) ? [...this].sort(keys) diff --git a/package.json b/package.json index e541490..ee039a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-types", - "version": "3.7.12", + "version": "3.7.13", "description": "Generic JavaScript types and type extensions...", "main": "main.js", "scripts": {